Determining gaze direction to generate augmented reality content

ABSTRACT

The subject technology determines a gaze direction in a field of view of a user using an eyewear device. The subject technology generates an anchor point in the field of view based at least in part on the determined gaze direction. The subject technology identifies a surface corresponding to a ground plane in the field of view. The subject technology determines a distance from the identified surface to the anchor point. The subject technology generates AR content based at least in part on the determined distance. The subject technology renders the generated AR content in the field of view for display by the eyewear device.

PRIORITY CLAIM

This application claims the benefit of priority of U.S. ProvisionalPatent Application No. 63/133,143, filed Dec. 31, 2020, which is herebyincorporated by reference herein in its entirety for all purposes.

BACKGROUND

With the increased use of digital images, affordability of portablecomputing devices, availability of increased capacity of digital storagemedia, and increased bandwidth and accessibility of network connections,digital images have become a part of the daily life for an increasingnumber of people.

Some electronics-enabled eyewear devices, such as so-called smartglasses, allow users to interact with virtual content while a user isengaged in some activity. Users wear the eyewear devices and can view areal-world environment through the eyewear devices while interactingwith virtual content that is displayed by the eyewear devices.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

To easily identify the discussion of any particular element or act, themost significant digit or digits in a reference number refer to thefigure number in which that element is first introduced.

FIG. 1 is a diagrammatic representation of a networked environment inwhich the present disclosure may be deployed, in accordance with someexample embodiments.

FIG. 2 is a diagrammatic representation of a messaging clientapplication, in accordance with some example embodiments.

FIG. 3 is a diagrammatic representation of a data structure asmaintained in a database, in accordance with some example embodiments.

FIG. 4 is a diagrammatic representation of a message, in accordance withsome example embodiments.

FIG. 5 shows a front perspective view of an eyewear device in the formof a pair of smart glasses that include a eyewear system according toone example embodiment.

FIG. 6 is a schematic diagram illustrating a structure of the messageannotations, as described in FIG. 4, including additional informationcorresponding to a given message, according to some embodiments.

FIG. 7 is a block diagram illustrating various modules of an eyewearsystem, according to certain example embodiments.

FIGS. 8A and 8B illustrate examples of tracking a gaze direction toperform an operation(s) by the eyewear system in accordance withimplementations of the subject technology.

FIG. 9 illustrates examples of AR content generated in a field of viewof a user based on a determined gaze direction of the user while usingthe eyewear device.

FIG. 10 is a flowchart illustrating a method, according to certainexample embodiments.

FIG. 11 is block diagram showing a software architecture within whichthe present disclosure may be implemented, in accordance with someexample embodiments.

FIG. 12 is a diagrammatic representation of a machine, in the form of acomputer system within which a set of instructions may be executed forcausing the machine to perform any one or more of the methodologiesdiscussed, in accordance with some example embodiments.

DETAILED DESCRIPTION

Users with a range of interests from various locations can capturedigital images of various subjects and make captured images available toothers via networks, such as the Internet. To enhance users' experienceswith digital images and provide various features, enabling computingdevices to perform image processing operations on various objects and/orfeatures captured in a wide range of changing conditions (e.g., changesin image scales, noises, lighting, movement, or geometric distortion)can be challenging and computationally intensive.

Augmented reality technology aims to bridge a gap between virtualenvironments and a real world environment by providing an enhanced realworld environment that is augmented with electronic information. As aresult, the electronic information appears to be part of the real worldenvironment as perceived by a user. In an example, augmented realitytechnology further provides a user interface to interact with theelectronic information that is overlaid in the enhanced real worldenvironment.

A augmented reality (AR) system enables real and virtual environments tobe combined in varying degrees to facilitate interactions from a user ina real time manner. Such an AR system, as described herein, thereforecan include various possible combinations of real and virtualenvironments, including augmented reality that primarily includes realelements and is closer to a real environment than a virtual environment(e.g., without real elements). In this manner, a real environment can beconnected with a virtual environment by the AR system. A user immersedin an AR environment can navigate through such an environment and the ARsystem can track the user's viewpoint to provide a visualization basedon how the user is situated in the environment. Augmented reality (AR)experiences can be provided in a messaging client application (or themessaging system) as described in embodiments herein.

Embodiments of the subject technology described herein enable variousoperations involving AR content for capturing and modifying such contentwith a given electronic device, such as a wearable headset device (e.g.,a given eyewear device) and a mobile computing device.

Messaging systems are frequently utilized and are increasingly leveragedby users of mobile computing devices, in various settings, to providedifferent types of functionality in a convenient manner. As describedherein, the subject messaging system comprises practical applicationsthat provide improvements in capturing image data and rendering ARcontent (e.g., images, videos, and the like) based on the captured imagedata by at least providing technical improvements with capturing imagedata using power and resource constrained electronic devices. Suchimprovements in capturing image data are enabled by techniques providedby the subject technology, which reduce latency and increase efficiencyin processing captured image data thereby also reducing powerconsumption in the capturing devices.

As discussed further herein, the subject infrastructure supports thecreation and sharing of interactive media, referred to herein asmessages including 3D content or AR effects, throughout variouscomponents of a messaging system. In example embodiments describedherein, messages can enter the system from a live camera or via fromstorage (e.g., where messages including 3D content and/or AR effects arestored in memory or a database). The subject system supports motionsensor input, and loading of external effects and asset data.

As referred to herein, the phrase “augmented reality experience,”“augmented reality content item,” “augmented reality content generator”includes or refers to various image processing operations correspondingto an image modification, filter, AR content generators, media overlay,transformation, and the like, and additionally can include playback ofaudio or music content during presentation of AR content or mediacontent, as described further herein.

FIG. 1 is a block diagram showing an example messaging system 100 forexchanging data (e.g., messages and associated content) over a network.The messaging system 100 includes multiple instances of a client device102, each of which hosts a number of applications including a messagingclient application 104. Each messaging client application 104 iscommunicatively coupled to other instances of the messaging clientapplication 104 and a messaging server system 108 via a network 106(e.g., the Internet).

A messaging client application 104 is able to communicate and exchangedata with another messaging client application 104 and with themessaging server system 108 via the network 106. The data exchangedbetween messaging client application 104, and between a messaging clientapplication 104 and the messaging server system 108, includes functions(e.g., commands to invoke functions) as well as payload data (e.g.,text, audio, video or other multimedia data).

The messaging system 100 includes an eyewear device 150, which hosts aneyewear system 160, among other applications. The eyewear device 150 iscommunicatively coupled to the client device 102 via the network 106(which may include via a dedicated short-range communication path, suchas a Bluetooth™ or Wi-Fi direct connection).

The eyewear device 150 may be a head mounted portable system, worn by auser, that includes a display system capable of presenting avisualization of an augmented reality environment to the user (e.g.,head mounted display device). The eyewear device 150 may be powered witha battery of some kind. In an example, the display system controlled bythe eyewear system 160 of the eyewear device 150 provides a stereoscopicpresentation of the augmented reality environment, enabling athree-dimensional visual display of a rendering of a particular scene,to the user. Further, the eyewear device 150 may include various sensorsincluding, but not limited to, cameras, image sensors, touch sensors,microphones, inertial measurement units (IMU), heart rate, temperature,among other types of sensors. Moreover, the eyewear device 150 mayinclude hardware elements that can receive user input such as hardwarebuttons or switches. User input detected by such sensors and/or hardwareelements correspond to various input modalities to initiate a particularoperation(s). For example, such input modalities may include, but notlimited to, facial tracking, eye tracking (e.g., gaze direction), handtracking, gesture tracking, biometric readings (e.g., heart rate, pulse,pupil dilation, breath, temperature, electroencephalogram, olfactory),recognizing speech or audio (e.g., particular hotwords), and activatingbuttons or switches, etc.

The eyewear device 150 may be communicatively coupled to a base devicesuch as the client device 102. Such a base device may, in general,include more computing resources and/or available power in comparisonwith the eyewear device 150. In an example, the eyewear device 150 mayoperate in various modes. For instance, the eyewear device 150 canoperate in a standalone mode independent of any base device.

The eyewear device 150 may also operate in a wireless tethered mode(e.g., connected via a wireless connection with a base device such asclient device 102), working in conjunction with a given base device.When the eyewear device 150 operates in the wireless tethered mode, aleast a portion of processing user inputs and/or rendering the augmentedreality environment may be offloaded to the base device thereby reducingprocessing burdens on the eyewear device 150. For instance, in animplementation, the eyewear device 150 works in conjunction with theclient device 102 to generate an augmented reality environment includingphysical and/or virtual objects that enables different forms ofinteraction (e.g., visual, auditory, and/or physical or tactileinteraction) between the user and the generated augmented realityenvironment in a real-time manner. In an example, the eyewear device 150provides a rendering of a scene corresponding to the augmented realityenvironment that can be perceived by the user and interacted with in areal-time manner. Additionally, as part of presenting the renderedscene, the eyewear device 150 may provide sound, haptic, or tactilefeedback to the user. The content of a given rendered scene may bedependent on available processing capability, network availability andcapacity, available battery power, and current system workload.

In an implementation, the eyewear system 160 generates a messageincluding a recording of a real environment and generates an augmentedreality environment including two-dimensional (2D) video for sharing andplayback. In another implementation, the eyewear system 160 generates amessage, and subsequently generates a three-dimensional (3D)representation merging information from all sensors and/or combiningrecording with other users' messages (e.g., different point of views(POVs)). It is further appreciated that the client device 102 can alsogenerate such augmented reality environments either working inconjunction with the eyewear device 150 or independently of the eyeweardevice 150.

The eyewear system 160 automatically or selectively moves augmentedreality or virtual reality content from one virtual position to anotheras the user moves around the eyewear device 150. For example, the useror wearer of the eyewear device 150 may initially be looking at a firstportion of a real-world environment (e.g., a first room in a house). Theuser may provide input (e.g., using a client device 102 or a voiceactivated or touch activated interface of the eyewear device 150) tolaunch or access virtual content that includes one or more objects.

The messaging server system 108 provides server-side functionality viathe network 106 to a particular messaging client application 104. Whilecertain functions of the messaging system 100 are described herein asbeing performed by either a messaging client application 104 or by themessaging server system 108, the location of certain functionalityeither within the messaging client application 104 or the messagingserver system 108 is a design choice. For example, it may be technicallypreferable to initially deploy certain technology and functionalitywithin the messaging server system 108, but to later migrate thistechnology and functionality to the messaging client application 104where a client device 102 has a sufficient processing capacity.

The messaging server system 108 supports various services and operationsthat are provided to the messaging client application 104. Suchoperations include transmitting data to, receiving data from, andprocessing data generated by the messaging client application 104. Thisdata may include, message content, client device information,geolocation information, media annotation and overlays, message contentpersistence conditions, social network information, and live eventinformation, as examples. Data exchanges within the messaging system 100are invoked and controlled through functions available via userinterfaces ((As) of the messaging client application 104.

Turning now specifically to the messaging server system 108, anApplication Program Interface (API) server 110 is coupled to, andprovides a programmatic interface to, an application server 112. Theapplication server 112 is communicatively coupled to a database server118, which facilitates access to a database 120 in which is stored dataassociated with messages processed by the application server 112.

The Application Program Interface (API) server 110 receives andtransmits message data (e.g., commands and message payloads) between theclient device 102 and the application server 112. Specifically, theApplication Program interface (API) server 110 provides a set ofinterfaces (e.g., routines and protocols) that can be called or queriedby the messaging client application 104 in order to invoke functionalityof the application server 112. The Application Program Interface (API)server 110 exposes various functions supported by the application server112, including account registration, login functionality, the sending ofmessages, via the application server 112, from a particular messagingclient application 104 to another messaging client application 104, thesending of media files (e.g., images or video) from a messaging clientapplication 104 to the messaging server application 114, and forpossible access by another messaging client application 104, the settingof a collection of media data (e.g., story), the retrieval of a list offriends of a user of a client device 102, the retrieval of suchcollections, the retrieval of messages and content, the adding anddeletion of friends to a social graph, the location of friends within asocial graph, and opening an application event (e.g., relating to themessaging client application 104).

The application server 112 hosts a number of applications andsubsystems, including a messaging server application 114, an imageprocessing system 116 and a social network system 122. The messagingserver application 114 implements a number of message processingtechnologies and functions, particularly related to the aggregation andother processing of content (e.g., textual and multimedia content)included in messages received from multiple instances of the messagingclient application 104. As will be described in further detail, the textand media content from multiple sources may be aggregated intocollections of content (e.g., called stories or galleries). Thesecollections are then made available, by the messaging server application114, to the messaging client application 104. Other processor and memoryintensive processing of data may also be performed server-side by themessaging server application 114, in view of the hardware requirementsfor such processing.

The application server 112 also includes an image processing system 116that is dedicated to performing various image processing operations,typically with respect to images or video received within the payload ofa message at the messaging server application 114.

The social network system 122 supports various social networkingfunctions services, and makes these functions and services available tothe messaging server application 114. To this end, the social networksystem 122 maintains and accesses an entity graph 304 (as shown in FIG.3) within the database 120. Examples of functions and services supportedby the social network system 122 include the identification of otherusers of the messaging system 100 with which a particular user hasrelationships or is ‘following’, and also the identification of otherentities and interests of a particular user.

The application server 112 is communicatively coupled to a databaseserver 118, which facilitates access to a database 120 in which isstored data associated with messages processed by the messaging serverapplication 114.

FIG. 2 is block diagram illustrating further details regarding themessaging system 100, according to example embodiments. Specifically,the messaging system 100 is shown to comprise the messaging clientapplication 104 and the application server 112, which in turn embody anumber of some subsystems, namely an ephemeral timer system 202, acollection management system 204 and an annotation system 206.

The ephemeral timer system 202 is responsible for enforcing thetemporary access to content permitted by the messaging clientapplication 104 and the messaging server application 114. To this end,the ephemeral tinier system 202 incorporates a number of timers that,based on duration and display parameters associated with a message, orcollection of messages (e.g., a story), selectively display and enableaccess to messages and associated content via the messaging clientapplication 104. Further details regarding the operation of theephemeral timer system 202 are provided below.

The collection management system 204 is responsible for managingcollections of media (e.g., collections of text, image video and audiodata). In some examples, a collection of content (e.g., messages,including images, video, text and audio) may be organized into an ‘eventgallery’ or an ‘event story.’ Such a collection may be made availablefor a specified time period, such as the duration of an event to whichthe content relates. For example, content relating to a music concertmay be made available as a ‘story’ for the duration of that musicconcert. The collection management system 204 may also be responsiblefor publishing an icon that provides notification of the existence of aparticular collection to the user interface of the messaging clientapplication 104.

The collection management system 204 furthermore includes a curationinterface 208 that allows a collection manager to manage and curate aparticular collection of content. For example, the curation interface208 enables an event organizer to curate a collection of contentrelating to a specific event (e.g., delete inappropriate content orredundant messages). Additionally, the collection management system 204employs machine vision (or image recognition technology) and contentrules to automatically curate a content collection. In certainembodiments, compensation may be paid to a user for inclusion ofuser-generated content into a collection. In such cases, the curationinterface 208 operates to automatically make payments to such users forthe use of their content.

The annotation system 206 provides various functions that enable a userto annotate or otherwise modify or edit media content associated with amessage. For example, the annotation system 206 provides functionsrelated to the generation and publishing of media overlays for messagesprocessed by the messaging system 100. The annotation system 206operatively supplies a media overlay or supplementation (e.g., an imagefilter) to the messaging client application 104 based on a geolocationof the client device 102. In another example, the annotation system 206operatively supplies a media overlay to the messaging client application104 based on other information, such as social network information ofthe user of the client device 102. A media overlay may include audio andvisual content and visual effects. Examples of audio and visual contentinclude pictures, texts, logos, animations, and sound effects. Anexample of a visual effect includes color overlaying. The audio andvisual content or the visual effects can be applied to a media contentitem (e.g., a photo) at the client device 102. For example, the mediaoverlay may include text that can be overlaid on top of a photographtaken by the client device 102. In another example, the media overlayincludes an identification of a location overlay (e.g., Venice beach), aname of a live event, or a name of a merchant overlay (e.g., BeachCoffee House). In another example, the annotation system 206 uses thegeolocation of the client device 102 to identify a media overlay thatincludes the name of a merchant at the geolocation of the client device102. The media overlay may include other indicia associated with themerchant. The media overlays may be stored in the database 120 andaccessed through the database server 118.

In one example embodiment, the annotation system 206 provides auser-based publication platform that enables users to select ageolocation on a map, and upload content associated with the selectedgeolocation. The user may also specify circumstances under which aparticular media overlay should be offered to other users. Theannotation system 206 generates a media overlay that includes theuploaded content and associates the uploaded content with the selectedgeolocation.

In another example embodiment, the annotation system 206 provides amerchant-based publication platform that enables merchants to select aparticular media overlay associated with a geolocation via a biddingprocess. For example, the annotation system 206 associates the mediaoverlay of a highest bidding merchant with a corresponding geolocationfor a predefined amount of time.

FIG. 3 is a schematic diagram illustrating data structures 300 which maybe stored in the database 120 of the messaging server system 108,according to certain example embodiments. While the content of thedatabase 120 is shown to comprise a number of tables, it will beappreciated that the data could be stored in other types of datastructures (e.g., as an object-oriented database).

The database 120 includes message data stored within a message table314. The entity table 302 stores entity data, including an entity graph304. Entities for which records are maintained within the entity table302 may include individuals, corporate entities, organizations, objects,places, events, etc. Regardless of type, any entity regarding which themessaging server system 108 stores data may be a recognized entity. Eachentity is provided with a unique identifier, as well as an entity typeidentifier (not shown).

The entity graph 304 furthermore stores information regardingrelationships and associations between entities. Such relationships maybe social, professional (e.g., work at a common corporation ororganization) interested-based or activity-based, merely for example,

The database 120 also stores annotation data, in the example form offilters, in an annotation table 312. Filters for which data is storedwithin the annotation table 312 are associated with and applied tovideos (for which data is stored in a video table 310) and/or images(for which data is stored in an image table 308). Filters, in oneexample, are overlays that are displayed as overlaid on an image orvideo during presentation to a recipient user. Filters may be of variestypes, including user-selected filters from a gallery of filterspresented to a sending user by the messaging client application 104 whenthe sending user is composing a message. Other types of filters includegeolocation filters (also known as geo-filters) which may be presentedto a sending user based on geographic location. For example, geolocationfilters specific to a neighborhood or special location may be presentedwithin a user interface by the messaging client application 104, basedon geolocation information determined by a GPS unit of the client device102. Another type of filer is a data filer, which may be selectivelypresented to a sending user by the messaging client application 104,based on other inputs or information gathered by the client device 102during the message creation process. Example of data filters includecurrent temperature at a specific location, a current speed at which asending user is traveling, battery life for a client device 102, or thecurrent time.

Other annotation data that may be stored within the image table 308 areaugmented reality content generators (e.g., corresponding to applying ARcontent generators, augmented reality experiences, or augmented realitycontent items). An augmented reality content generator may be areal-time special effect and sound that may be added to an image or avideo.

As described above, augmented reality content generators, augmentedreality content items, overlays, image transformations, AR images andsimilar terms refer to modifications that may be made to videos orimages. This includes real-time modification which modifies an image asit is captured using a device sensor and then displayed on a screen ofthe device with the modifications. This also includes modifications tostored content, such as video clips in a gallery that may be modified.For example, in a device with access to multiple augmented realitycontent generators, a user can use a single video clip with multipleaugmented reality content generators to see how the different augmentedreality content generators will modify the stored clip. For example,multiple augmented reality content generators that apply differentpseudorandom movement models can be applied to the same content byselecting different augmented reality content generators for thecontent. Similarly, real-time video capture may be used with anillustrated modification to show how video images currently beingcaptured by sensors of a device would modify the captured data. Suchdata may simply be displayed on the screen and not stored in memory, orthe content captured by the device sensors may be recorded and stored inmemory with or without the modifications (or both). In some systems, apreview feature can show how different augmented reality contentgenerators will look within different windows in a display at the sametime. This can, for example, enable multiple windows with differentpseudorandom animations to be viewed on a display at the same time.

Data and various systems using augmented reality content generators orother such transform systems to modify content using this data can thusinvolve detection of objects (e.g., faces, hands, bodies, cats, dogs,surfaces, objects, etc.), tracking of such objects as they leave, enter,and move around the field of view in video frames, and the modificationor transformation of such objects as they are tracked. In variousembodiments, different methods for achieving such transformations may beused. For example, some embodiments may involve generating athree-dimensional mesh model of the object or objects, and usingtransformations and animated textures of the model within the video toachieve the transformation. In other embodiments, tracking of points onan object may be used to place an image or texture (which may be twodimensional or three dimensional) at the tracked position. In stillfurther embodiments, neural network analysis of video frames may be usedto place images, models, or textures in content (e.g., images or framesof video). Augmented reality content generators thus refer both to theimages, models, and textures used to create transformations in content,as well as to additional modeling and analysis information needed toachieve such transformations with object detection, tracking, andplacement.

Real-time video processing can be performed with any kind of video data(e.g., video streams, video files, etc.) saved in a memory of acomputerized system of any kind. For example, a user can load videofiles and save them in a memory of a device, or can generate a videostream using sensors of the device. Additionally, any objects can beprocessed using a computer animation model, such as a human's face andparts of a human body, animals, or non-living things such as chairs,cars, or other objects.

In some embodiments, when a particular modification is selected alongwith content to be transformed, elements to be transformed areidentified by the computing device, and then detected and tracked ifthey are present in the frames of the video. The elements of the objectare modified according to the request for modification, thustransforming the frames of the video stream. Transformation of frames ofa video stream can be performed by different methods for different kindsof transformation. For example, for transformations of frames mostlyreferring to changing forms of object's elements characteristic pointsfor each of element of an object are calculated (e.g., using an ActiveShape Model (ASM) or other known methods). Then, a mesh based on thecharacteristic points is generated for each of the at least one elementof the object. This mesh used in the following stage of tracking theelements of the object in the video stream. In the process of tracking,the mentioned mesh for each element is aligned with a position of eachelement. Then, additional points are generated on the mesh. A first setof first points is generated for each element based on a request formodification, and a set of second points is generated for each elementbased on the set of first points and the request for modification. Then,the frames of the video stream can be transformed by modifying theelements of the object on the basis of the sets of first and secondpoints and the mesh. In such method, a background of the modified objectcan be changed or distorted as well by tracking and modifying thebackground.

In one or more embodiments, transformations changing some areas of anobject using its elements can be performed by calculating ofcharacteristic points for each element of an object and generating amesh based on the calculated characteristic points. Points are generatedon the mesh, and then various areas based on the points are generated.The elements of the object are then tracked by aligning the area foreach element with a position for each of the at least one element, andproperties of the areas can be modified based on the request formodification, thus transforming the frames of the video stream.Depending on the specific request for modification properties of thementioned areas can be transformed in different ways. Such modificationsmay involve changing color of areas; removing at least some part ofareas from the frames of the video stream; including one or more newobjects into areas which are based on a request for modification; andmodifying or distorting the elements of an area or object. In variousembodiments, any combination of such modifications or other similarmodifications may be used. For certain models to be animated, somecharacteristic points can be selected as control points to be used indetermining the entire state-space of options for the model animation.

In some embodiments of a computer animation model to transform imagedata using face detection, the face is detected on an image with use ofa specific face detection algorithm Viola-Jones). Then, an Active ShapeModel (ASM) algorithm is applied to the face region of an image todetect facial feature reference points.

In other embodiments, other methods and algorithms suitable for facedetection can be used. For example, in some embodiments, features arelocated using a landmark which represents a distinguishable pointpresent in most of the images under consideration. For facial landmarks,for example, the location of the left eye pupil may be used. In aninitial landmark is not identifiable (e.g., if a person has aneyepatch), secondary landmarks may be used. Such landmark identificationprocedures may be used for any such objects. In some embodiments, a setof landmarks forms a shape. Shapes can be represented as vectors usingthe coordinates of the points in the shape. One shape is aligned toanother with a similarity transform (allowing translation, scaling, androtation) that minimizes the average Euclidean distance between shapepoints. The mean shape is the mean of the aligned training shapes.

In some embodiments, a search for landmarks from the mean shape alignedto the position and size of the face determined by a global facedetector is started. Such a search then repeats the steps of suggestinga tentative shape by adjusting the locations of shape points by templatematching of the image texture around each point and then conforming thetentative shape to a global shape model until convergence occurs. Insome systems, individual template matches are unreliable and the shapemodel pools the results of the weak template matchers to form a strongeroverall classifier. The entire search is repeated at each level in animage pyramid, from coarse to fine resolution.

Embodiments of a transformation system can capture an image or videostream on a client device (e.g., the client device 102) and performcomplex image manipulations locally on the client device 102 whilemaintaining a suitable user experience, computation time, and powerconsumption. The complex image manipulations may include size and shapechanges, emotion transfers (e.g., changing a face from a frown to asmile), state transfers (e.g., aging a subject, reducing apparent age,changing gender), style transfers, graphical element application, andany other suitable image or video manipulation implemented by aconvolutional neural network that has been configured to executeefficiently on the client device 102.

In some example embodiments, a computer animation model to transformimage data can be used by a system where a user may capture an image orvideo stream of the user (e.g., a selfie) using a client device 102having a neural network operating as part of a messaging clientapplication 104 operating on the client device 102. The transform systemoperating within the messaging client application 104 determines thepresence of a face within the image or video stream and providesmodification icons associated with a computer animation model totransform image data, or the computer animation model can be present asassociated with an interface described herein. The modification iconsinclude changes which may be the basis for modifying the user's facewithin the image or video stream as part of the modification operation.Once a modification icon is selected, the transform system initiates aprocess to convert the image of the user to reflect the selectedmodification icon (e.g., generate a smiling face on the user). In someembodiments, a modified image or video stream may be presented in agraphical user interface displayed on the mobile client device as soonas the image or video stream is captured and a specified modification isselected. The transform system may implement a complex convolutionalneural network on a portion of the image or video stream to generate andapply the selected modification. That is, the user may capture the imageor video stream and be presented with a modified result in real time ornear real time once a modification icon has been selected. Further, themodification may he persistent while the video stream is being capturedand the selected modification icon remains toggled. Machine taughtneural networks may be used to enable such modifications.

In some embodiments, the graphical user interface, presenting themodification performed by the transform system, may supply the user withadditional interaction options. Such options may be based on theinterface used to initiate the content capture and selection of aparticular computer animation model (e.g., initiation from a contentcreator user interface). In various embodiments, a modification may bepersistent after an initial selection of a modification icon. The usermay toggle the modification on or off by tapping or otherwise selectingthe face being modified by the transformation system and store it forlater viewing or browse to other areas of the imaging application. Wheremultiple faces are modified by the transformation system, the user maytoggle the modification on or off globally by tapping or selecting asingle face modified and displayed within a graphical user interface. Insome embodiments, individual faces, among a group of multiple faces, maybe individually modified or such modifications may be individuallytoggled by tapping or selecting the individual face or a series ofindividual faces displayed within the graphical user interface.

In some example embodiments, a graphical processing pipelinearchitecture is provided that enables different augmented realityexperiences (e.g., AR content generators) to be applied in correspondingdifferent layers. Such a graphical processing pipeline provides anextensible rendering engine for providing multiple augmented realityexperiences that are included in a composite media (e.g., image orvideo) or composite AR content for rendering by the messaging clientapplication 104 (or the messaging system 100).

As mentioned above, the video table 310 stores video data which, in oneembodiment, is associated with messages for which records are maintainedwithin the message table 314. Similarly, the image table 308 storesimage data associated with messages for which message data is stored inthe entity table 302. The entity table 302 may associate variousannotations from the annotation table 312 with various images and videosstored in the image table 308 and the video table 310.

A story table 306 stores data regarding collections of messages andassociated image, video, or audio data, which are compiled into acollection (e.g., a story or a gallery). The creation of a particularcollection may be initiated by a particular user (e.g., each user forwhich a record is maintained in the entity table 302). A user may createa ‘personal story’ in the form of a collection of content that has beencreated and sent/broadcast by that user. To this end, the user interfaceof the messaging client application 104 may include an icon that isuser-selectable to enable a sending user to add specific content to hisor her personal story.

A collection may also constitute a ‘live story,’ which is a collectionof content from multiple users that is created manually, automatically,or using a combination of manual and automatic techniques. For example,a ‘live story’ may constitute a curated stream of user-submitted contentfrom varies locations and events. Users whose client devices havelocation services enabled and are at a common location event at aparticular time may, for example, be presented with an option, via auser interface of the messaging client application 104, to contributecontent to a particular live story. The live story may be identified tothe user by the messaging client application 104, based on his or herlocation. The end result is a ‘live story’ told from a communityperspective.

A further type of content collection is known as a ‘location story’,which enables a user whose client device 102 is located within aspecific geographic location (e.g., on a college or university campus)to contribute to a particular collection. In some embodiments, acontribution to a location story may require a second degree ofauthentication to verify that the end user belongs to a specificorganization or other entity is a student on the university campus).

FIG. 4 is a schematic diagram illustrating a structure of a message 400,according to some embodiments, generated by a messaging clientapplication 104 or the eyewear system 160 for communication to a furthermessaging client application 104 or the messaging server application114. The content of a particular message 400 is used to populate themessage table 314 stored within the database 120, accessible by themessaging server application 114. Similarly, the content of a message400 is stored in memory as ‘in-transit’ or ‘in-flight’ data of theclient device 102 or the application server 112, The message 400 isshown to include the following components:

A message identifier 402: a unique identifier that identifies themessage 400.

A message text payload 404: text, to be generated by a user via a userinterface of the client device 102 and that is included in the message400.

A message image payload 406: image data, captured by a camera componentof a client device 102 or retrieved from a memory component of a clientdevice 102, and that is included in the message 400.

A message video payload 408: video data, captured by a camera componentor retrieved from a memory component of the client device 102 and thatis included in the message 400.

A message audio payload 410: audio data, captured by a microphone orretrieved from a memory component of the client device 102, and that isincluded in the message 400.

A message annotations 412: annotation data (e.g., filters, stickers orother enhancements) that represents annotations to be applied to messageimage payload 406, message video payload 408, or message audio payload410 of the message 400.

A message duration parameter 414: parameter value indicating, inseconds, the amount of time for which content of the message (e.g., themessage image payload 406, message video payload 408, message audiopayload 410) is to be presented or made accessible to a user via themessaging client application 104.

A message geolocation parameter 416: geolocation data (e.g., latitudinaland longitudinal coordinates) associated with the content payload of themessage. Multiple message geolocation parameter 416 values may beincluded in the payload, each of these parameter values being associatedwith respect to content items included in the content (e.g., a specificimage into within the message image payload 406, or a specific video inthe message video payload 408).

A message story identifier 418: identifier values identifying one ormore content collections (e.g., ‘stories’) with which a particularcontent item in the message image payload 406 of the message 400 isassociated. For example, multiple images within the message imagepayload 406 may each be associated with multiple content collectionsusing identifier values.

A message tag 420: each message 400 may be tagged with multiple tags,each of which is indicative of the subject matter of content included inthe message payload. For example, where a particular image included inthe message image payload 406 depicts an animal (e.g., a lion), a tagvalue may be included within the message tag 420 that is indicative ofthe relevant animal. Tag values may be generated manually, based on userinput, or may be automatically generated using, for example, imagerecognition.

A message sender identifier 422: an identifier (e.g., a messaging systemidentifier, email address, or device identifier) indicative of a user ofthe client device 102 on which the message 400 was generated and fromwhich the message 400 was sent

A message receiver identifier 424: an identifier (e.g., a messagingsystem identifier, email address, or device identifier) indicative of auser of the client device 102 to which the message 400 is addressed.

The contents (e.g., values) of the various components of message 400 maybe pointers to locations in tables within which content data values arestored. For example, an image value in the message image payload 406 maybe a pointer to (or address of) a location within an image table 308.Similarly, values within the message video payload 408 may point to datastored within a video table 310, values stored within the messageannotations 412 may point to data stored in an annotation table 312,values stored within the message story identifier 418 may point to datastored in a story table 306, and values stored within the message senderidentifier 422 and the message receiver identifier 424 may point to userrecords stored within an entity table 302.

FIG. 5 shows a front perspective view of an eyewear device 150 in theform of a pair of smart glasses that include a eyewear system 160according to one example embodiment. The eyewear device 150 includes abody 503 comprising a front piece or frame 506 and a pair of temples 509connected to the frame 506 for supporting the frame 506 in position on auser's face when the eyewear device 150 is worn. The frame 506 can bemade from any suitable material such as plastics or metal, including anysuitable shape memory alloy.

The eyewear device 150 includes a pair of optical elements in the formof a pair of lenses 512 held by corresponding optical element holders inthe form of a pair of rims 515 forming part of the frame 506. The rims515 are connected by a bridge 518. In other embodiments, one or both ofthe optical elements can be a display, a display assembly, or a lens anddisplay combination.

The frame 506 includes a pair of end pieces 521 defining lateral endportions of the frame 506. In this example, a variety of electronicscomponents are housed in one or both of the end pieces 521. The temples509 are coupled to the respective end pieces 521. In this example, thetemples 509 are coupled to the frame 506 by respective hinges so as tobe hingedly movable between a wearable mode and a collapsed mode inwhich the temples 509 are pivoted towards the frame 506 to liesubstantially flat against it. In other embodiments, the temples 509 canbe coupled to the frame 506 by any suitable means, or can be rigidly orfixedly secured to the frame 506 so as to be integral therewith.

Each of the temples 509 that includes a front portion of that is coupledto the frame 506 and any suitable rear portion for coupling to the earof the user, such as the curves or cute piece illustrated in the exampleembodiment of FIG. 5. In some embodiments, the frame 506 is formed of asingle piece of material, so as to have a unitary or monolithicconstruction. In some embodiments, the whole of the body 503 (includingboth the frame 506 and the temples 509) can be of the unitary ormonolithic construction.

The eyewear device 150 has onboard electronics components including acomputing device, such as a computer 524, or low power processor, whichcan in different embodiments be of any suitable type so as to be carriedby the body 503. In some embodiments, the computer 524 is at leastpartially housed in one or both of the temples 509. In the presentembodiment, various components of the computer 524 are housed in thelateral end pieces 521 of the frame 506. The computer 524 includes oneor more processors with memory (e.g., a volatile storage device, such asrandom access memory or registers), a storage device (e.g., anonvolatile storage device), wireless communication circuitry (e.g., BLEcommunication devices and/or WiFi direct devices), and a power source.The computer 524 comprises low-power circuitry, high-speed circuitry,and, in some embodiments, a display processor. Various embodiments mayinclude these elements in different configurations or integratedtogether in different ways.

The computer 524 additionally includes a battery 527 or other suitableportable power supply. In one embodiment, the battery 527 is disposed inone of the temples 509. In the eyewear device 150 shown in FIG. 5, thebattery 527 is shown as being disposed in one of the end pieces 521,being electrically coupled to the remainder of the computer 524 housedin the corresponding end piece 521.

The eyewear device 150 is camera-enabled, in this example comprising acamera 530 mounted in one of the end pieces 521 and facing forwards soas to be aligned more or less with the direction of view of a wearer ofthe eyewear device 150. The camera 530 is configured to capture digitalimages (also referred to herein as digital photographs or pictures) aswell as digital video content. Operation of the camera 530 is controlledby a camera controller provided by the computer 524, image datarepresentative of images or video captured by the camera 530 beingtemporarily stored on a memory forming part of the computer 524. In someembodiments, the eyewear device 150 can have a pair of cameras 530, e.g.housed by the respective end pieces 521.

As will be described in greater detail below, the onboard computer 524and the lenses 512 are configured together to provide a eyewear system160 that automatically and selectively re-centers virtual content tobring the virtual content to within view of the lenses 512 by moving thevirtual content from a first virtual location to a second virtuallocation. Specifically, the lenses 512 can display virtual content orone or more virtual objects. This makes it appear to the user that thevirtual content is integrated within a real-world environment that theuser views through the lenses 512. In some embodiments, the virtualcontent is received from the client device 102. In some embodiments, thevirtual content is received directly from the application server 112.

The eyewear device 150 includes an accelerometer and a touch interfaceand a voice command system. Based on input received by the eyeweardevice 150 from the accelerometer and a touch interface and the voicecommand system, the eyewear device 150 can control user interaction withthe virtual content. In one example, the user interaction can controlplayback of content that is presented on the lenses 512. In anotherexample, the user interaction can navigate through a playlist or musicor video library. In another example, the user interaction can navigatethrough a conversation the user is involved in, such as by scrollingthrough various three-dimensional or two-dimensional conversationelements (e.g., chat bubbles) and selecting individual conversationelements to respond to generate messages to transmit to participants ofthe conversation.

The eyewear system 160 (which can be implemented by the computer 524)assigns virtual content to virtual locations. The eyewear system 160monitors the current virtual location that is within view of areal-world environment. The eyewear system 160 retrieves virtual contentfor display that is within a specified range of the current virtuallocation that is within view. As the eyewear device 150 is moved aroundto be directed to a new portion of the real-world environment,associated with a different set of virtual locations, the eyewear system160 excludes any virtual content that is not within range of thedifferent set of virtual locations. For example, as the eyewear device150 is moved around to he directed to a new portion of the real-worldenvironment that does not overlap with the previously displayed portionof the real-world environment, the eyewear system 160 excludes anyvirtual content that is not within range of the different set of virtuallocations.

The eyewear system 160 can receive a request to bring virtual contentinto a current view. In response, the eyewear system 160 updates thevirtual location assigned and associated with the virtual content to bethe virtual location that is associated with the current view of thereal-world environment. As a result, the virtual content is now movedfrom being out of view to be included in the current view to allow theuser to interact with the virtual content. In some cases, the user canonly interact with virtual content that is within view of the lenses512. If the user moves around to face another direction resulting in thevirtual content going out of view, the user input no longer can controlor interact with the previously displayed virtual content until thevirtual content is brought back into view.

The eyewear device 150 further includes one or more communicationdevices, such as Bluetooth low energy (BLE) communication interface.Such BLE communication interface enables the eyewear device 150 tocommunicate wirelessly with the client device 102. Other forms ofwireless communication can also be employed instead of, or in additionto, the BLE communication interface, such as a WiFi direct interface.The BLE communication interface implements a standard number of BLEcommunication protocols.

A first of the communications protocols implemented by the BLE interfaceof the eyewear device 150 enables an unencrypted link to be establishedbetween the eyewear device 150 and the client device 102. In this firstprotocol, the link-layer communication (the physical interface ormedium) between the eyewear device 150 and the client device 102includes unencrypted data. In this first protocol, the application layer(the communication layer operating on the physically exchanged data)encrypts and decrypts data that is physically exchanged in unencryptedform over the link layer of the BLE communication interface. In thisway, data exchanged over the physical layer can freely be read by aneavesdropping device, but the eavesdropping device will not be able todecipher the data that is exchanged without performing a decryptionoperation in the application layer.

A second of the communications protocols implemented by the BLEinterface of the eyewear device 150 enables an encrypted link to beestablished between the eyewear device 150 and the client device 102. Inthis second protocol, the link-layer communication (the physicalinterface) between the eyewear device 150 and the client device 102receives data from the application layer and adds a first type ofencryption to the data before exchanging the data over the physicalmedium. In this second protocol, the application layer (thecommunication layer operating on the physically exchanged data) may ormay not use a second type of encryption to encrypt and decrypt data thatis physically exchanged in encrypted form, using the first type ofencryption, over the link layer of the BLE communication interface.Namely, data can be first encrypted by the application layer and then befurther encrypted by the physical layer before being exchanged over thephysical medium. Following the exchange over the physical medium, thedata is then decrypted by the physical layer and then decrypted again(e.g., using a different type of encryption) by the application layer.In this way, data exchanged over the physical layer cannot be read by aneavesdropping device as the data is encrypted in the physical medium.

In some embodiments, the client device 102 communicates with the eyeweardevice 150 using the first protocol to exchange images or videos orvirtual content between the messaging client 104 and the eyewear device150.

As described above, media overlays, such as AR content generators,overlays, image transformations, AR images and similar terms refer tomodifications that may be made to videos or images. This includesreal-time modification which modifies an image as it is captured using adevice sensor and then displayed on a screen of the device with themodifications. This also includes modifications to stored content, suchas video clips in a gallery that may be modified. For example, in adevice with access to multiple media overlays (e.g., AR contentgenerators), a user can use a single video clip with multiple AR contentgenerators to see how the different AR content generators will modifythe stored clip. For example, multiple AR content generators that applydifferent pseudorandom movement models can be applied to the samecontent by selecting different AR content generators for the content.Similarly, real-time video capture may be used with an illustratedmodification to show how video images currently being captured bysensors of a device would modify the captured data. Such data may simplybe displayed on the screen and not stored in memory, or the contentcaptured by the device sensors may be recorded and stored in memory withor without the modifications (or both). In some systems, a previewfeature can show how different AR content generators will look withindifferent windows in a display at the same time. This can, for example,enable multiple windows with different pseudorandom animations to beviewed on a display at the same time.

Data and various systems to use AR content generators or other suchtransform systems to modify content using this data can thus involvedetection of objects (e.g. faces, hands, bodies, cats, dogs, surfaces,objects, etc.), tracking of such objects as they leave, enter, and movearound the field of view in video frames, and the modification ortransformation of such objects as they are tracked. In variousembodiments, different methods for achieving such transformations may beused. For example, some embodiments may involve generating athree-dimensional mesh model of the object or objects, and usingtransformations and animated textures of the model within the video toachieve the transformation. In other embodiments, tracking of points onan object may be used to place an image or texture (which may be twodimensional or three dimensional) at the tracked position. In stillfurther embodiments, neural network analysis of video frames may be usedto place images, models, or textures in content (e.g. images or framesof video). Lens data thus refers both to the images, models, andtextures used to create transformations in content, as well as toadditional modeling and analysis information needed to achieve suchtransformations with object detection, tracking, and placement.

Real time video processing can be performed with any kind of video data,(e.g. video streams, video files, etc.) saved in a memory of acomputerized system of any kind. For example, a user can load videofiles and save them in a memory of a device, or can generate a videostream using sensors of the device. Additionally, any objects can beprocessed using a computer animation model, such as a human's face andparts of a human body, animals, or non-living things such as chairs,cars, or other objects.

In some embodiments, when a particular modification is selected alongwith content to be transformed, elements to be transformed areidentified by the computing device, and then detected and tracked ifthey are present in the frames of the video. The elements of the objectare modified according to the request for modification, thustransforming the frames of the video stream. Transformation of frames ofa video stream can be performed by different methods for different kindsof transformation. For example, for transformations of frames mostlyreferring to changing forms of object's elements characteristic pointsfor each of element of an object are calculated (e.g. using an ActiveShape Model (ASM) or other known methods). Then, a mesh based on thecharacteristic points is generated for each of the at least one elementof the object. This mesh used in the following stage of tracking theelements of the object in the video stream. In the process of tracking,the mentioned mesh for each element is aligned with a position of eachelement. Then, additional points are generated on the mesh. A first setof first points is generated for each element based on a request formodification, and a set of second points is generated for each elementbased on the set of first points and the request for modification. Then,the frames of the video stream can be transformed by modifying theelements of the object on the basis of the sets of first and secondpoints and the mesh. In such method a background of the modified objectcan be changed or distorted as well by tracking and modifying thebackground.

In one or more embodiments, transformations changing some areas of anobject using its elements can be performed by calculating ofcharacteristic points for each element of an object and generating amesh based on the calculated characteristic points. Points are generatedon the mesh, and then various areas based on the points are generated.The elements of the object are then tracked by aligning the area foreach element with a position for each of the at least one element, andproperties of the areas can be modified based on the request formodification, thus transforming the frames of the video stream.Depending on the specific request for modification properties of thementioned areas can be transformed in different ways. Such modificationsmay involve: changing color of areas; removing at least some part ofareas from the frames of the video stream; including one or more newobjects into areas which are based on a request for modification; andmodifying or distorting the elements of an area or object. In variousembodiments, any combination of such modifications or other similarmodifications may be used. For certain models to be animated, somecharacteristic points can be selected as control points to be used indetermining the entire state-space of options for the model animation.

In some embodiments of a computer animation model to transform imagedata using face detection, the face is detected on an image with use ofa specific face detection algorithm Viola-Jones). Then, an Active ShapeModel (ASM) algorithm is applied to the face region of an image todetect facial feature reference points.

In other embodiments, other methods and algorithms suitable for facedetection can be used. For example, in some embodiments, features arelocated using a landmark which represents a distinguishable pointpresent in most of the images under consideration. For facial landmarks,for example, the location of the left eye pupil may be used. In aninitial landmark is not identifiable (e.g. if a person has an eyepatch),secondary landmarks may be used. Such landmark identification proceduresmay be used for any such objects. In some embodiments, a set oflandmarks forms a shape. Shapes can be represented as vectors using thecoordinates of the points in the shape. One shape is aligned to anotherwith a similarity transform (allowing translation, scaling, androtation) that minimizes the average Euclidean distance between shapepoints. The mean shape is the mean of the aligned training shapes.

In some embodiments, a search for landmarks from the mean shape alignedto the position and size of the face determined by a global facedetector is started. Such a search then repeats the steps of suggestinga tentative shape by adjusting the locations of shape points by templatematching of the image texture around each point and then conforming thetentative shape to a global shape model until convergence occurs. Insome systems, individual template matches are unreliable and the shapemodel pools the results of the weak template matchers to form a strongeroverall classifier. The entire search is repeated at each level in animage pyramid, from coarse to fine resolution.

Embodiments of a transformation system can capture an image or videostream on a client device and perform complex image manipulationslocally on a client device such as client device 102 while maintaining asuitable user experience, computation time, and power consumption. Thecomplex image manipulations may include size and shape changes, emotiontransfers (e.g., changing a face from a frown to a smile), statetransfers (e.g., aging a subject, reducing apparent age, changinggender), style transfers, graphical element application, and any othersuitable image or video manipulation implemented by a convolutionalneural network that has been configured to execute efficiently on aclient device.

In some example embodiments, a computer animation model to transformimage data can be used by a system where a user may capture an image orvideo stream of the user (e.g., a selfie) using a client device 102having a neural network operating as part of a messaging clientapplication 104 operating on the client device 102. The transform systemoperating within the messaging client application 104 determines thepresence of a face within the image or video stream and providesmodification icons associated with a computer animation model totransform image data, or the computer animation model can be present asassociated with an interface described herein. The modification iconsinclude changes which may be the basis for modifying the user's facewithin the image or video stream as part of the modification operation.Once a modification icon is selected, the transform system initiates aprocess to convert the image of the user to reflect the selectedmodification icon (e.g., generate a smiling face on the user). In someembodiments, a modified image or video stream may be presented in agraphical user interface displayed on the mobile client device as soonas the image or video stream is captured and a specified modification isselected. The transform system may implement a complex convolutionalneural network on a portion of the image or video stream to generate andapply the selected modification. That is, the user may capture the imageor video stream and be presented with a modified result in real time ornear real time once a modification icon has been selected. Further, themodification may be persistent while the video stream is being capturedand the selected modification icon remains toggled. Machine taughtneural networks may be used to enable such modifications.

In some embodiments, the graphical user interface, presenting themodification performed by the transform system, may supply the user withadditional interaction options. Such options may be based on theinterface used to initiate the content capture and selection of aparticular computer animation model (e.g. initiation from a contentcreator user interface). In various embodiments, a modification may bepersistent after an initial selection of a modification icon. The usermay toggle the modification on or off by tapping or otherwise selectingthe face being modified by the transformation system. and store it forlater viewing or browse to other areas of the imaging application. Wheremultiple faces are modified by the transformation system, the user maytoggle the modification on or off globally by tapping or selecting asingle face modified and displayed within a graphical user interface. Insome embodiments, individual faces, among a group of multiple faces, maybe individually modified or such modifications may be individuallytoggled by tapping or selecting the individual face or a series ofindividual faces displayed within the graphical user interface.

In some example embodiments, a graphical processing pipelinearchitecture is provided that enables different media overlays to beapplied in corresponding different layers. Such a graphical processingpipeline provides an extensible rendering engine for providing multipleaugmented reality content generators that are included in a compositemedia (e.g., image or video) or composite AR content for rendering bythe messaging client application 104 (or the messaging system 100).

As discussed herein, the subject infrastructure supports the creationand sharing of interactive messages with interactive effects throughoutvarious components of the messaging system 100. In an example, toprovide such interactive effects, a given interactive message mayinclude image data along with 2D data, or 3D data. The infrastructure asdescribed herein enables other forms of 3D and interactive media (e.g.,2D media content) to be provided across the subject system, which allowsfor such interactive media to be shared across the messaging system 100and alongside photo and video messages. In example embodiments describedherein, messages can enter the system from a live camera or via fromstorage (e.g., where messages with 2D or 3D content or augmented reality(AR) effects (e.g., 3D effects, or other interactive effects are storedin memory or a database). In an example of an interactive message with3D data, the subject system supports motion sensor input and manages thesending and storage of 3D data, and loading of external effects andasset data.

As mentioned above, an interactive message includes an image incombination with a 2D effect, or a 3D effect and depth data. In anexample embodiment, a message is rendered using the subject system tovisualize the spatial detail/geometry of what the camera sees, inaddition to a traditional image texture. When a viewer interacts withthis message by moving a client device, the movement triggerscorresponding changes in the perspective the image and geometry arerendered at to the viewer.

In an embodiment, the subject system provides AR effects (which mayinclude 3D effects using 3D data, or interactive 2D effects that do notuse 3D data) that work in conjunction with other components of thesystem to provide particles, shaders, 2D assets and 3D geometry that caninhabit different 3D-planes within messages. The AR effects as describedherein, in an example, are rendered in a real-time manner for the user.

As mentioned herein, a gyro-based interaction refers to a type ofinteraction in which a given client device's rotation is used as aninput to change an aspect of the effect (e.g., rotating phone alongx-axis in order to change the color of a light in the scene).

As mentioned herein, an augmented reality content generator refers to areal-time special effect and/or sound that may be added to a message andmodifies image and/or 3D data with an AR effects and/other 3D contentsuch as 3D animated graphical elements, 3D objects (e.g., non-animated),and the like.

The following discussion relates to example data that is stored inconnection with such a message in accordance to some embodiments.

FIG. 6 is a schematic diagram illustrating a structure of the messageannotations 412, as described above in FIG. 4, including additionalinformation corresponding to a given message, according to someembodiments, generated by the messaging client application 104 or theeyewear system 160.

In an embodiment, the content of a particular message 400, as shown inFIG. 3, including the additional data shown in FIG. 6 is used topopulate the message table 314 stored within the database 120 for agiven message, which is then accessible by the messaging clientapplication 104. As illustrated in FIG. 6, message annotations 412includes the following components corresponding to various data:

-   -   augmented reality (AR) content identifier 652: identifier of an        AR content generator utilized in the message    -   message identifier 654: identifier of the message    -   asset identifiers 656: a set of identifiers for assets in the        message. For example, respective asset identifiers can be        included for assets that are determined by the particular AR        content generator. In an embodiment, such assets are created by        the AR content generator on the sender side client device,        uploaded to the messaging server application 114, and utilized        on the receiver side client device in order to recreate the        message.    -   Examples of typical assets include:        -   The original still RGB image(s) captured by the camera        -   The post-processed image(s) with AR content generator            effects applied to the original image

-   augmented reality (AR) content metadata 658: additional metadata    associated with the AR content generator corresponding to the AR    identifier 652, such as:    -   AR content generator category: corresponding to a type or        classification for a particular AR content generator    -   AR content generator carousel index    -   carousel group: This can be populated and utilized when eligible        post-capture AR content generators are inserted into a carousel        interface. In an implementation, a new value “AR_DEFAULT_GROUP”        (e.g., a default group assigned to an AR content generator can        be added to the list of valid group names.

-   capture metadata 660 corresponding to additional metadata, such as:    -   camera image metadata        -   camera intrinsic data            -   focal length            -   principal point        -   other camera information (e.g., camera position)    -   sensor information        -   gyroscopic sensor data        -   position sensor data        -   accelerometer sensor data        -   other sensor data        -   location sensor data

FIG. 7 is a block diagram illustrating various modules of an eyewearsystem 160, according to certain example embodiments. The eyewear system160 is shown as including an AR content recording system 700. As furthershown, the AR content recording system 700 includes a camera module 702,a capture module 704, an image data processing module 706, a renderingmodule 708, and a content recording module 710. The various modules ofthe AR content recording system 700 are configured to communicate witheach other (e.g., via a bus, shared memory, or a switch). Any one ormore of these modules may be implemented using one or more computerprocessors 720 (e.g., by configuring such one or more computerprocessors to perform functions described for that module) and hence mayinclude one or more of the computer processors 720 (e.g., a set ofprocessors provided by the eyewear device 150).

Any one or more of the modules described may be implemented usinghardware alone (e.g., one or more of the computer processors 720 of amachine (e.g., machine 1200) or a combination of hardware and software.For example, any described module of the eyewear system 160 mayphysically include an arrangement of one or more of the computerprocessors 720 (e.g., a subset of or among the one or more computerprocessors of the machine (e.g., machine 1200) configured to perform theoperations described herein for that module. As another example, anymodule of the AR content recording system 700 may include software,hardware, or both, that configure an arrangement of one or more computerprocessors 720 (e.g., among the one or more computer processors of themachine (e.g., machine 1200) to perform the operations described hereinfor that module. Accordingly, different modules of the AR contentrecording system 700 may include and configure different arrangements ofsuch computer processors 720 or a single arrangement of such computerprocessors 720 at different points in time. Moreover, any two or moremodules of the eyewear system 160 may be combined into a single module,and the functions described herein for a single module may be subdividedamong multiple modules. Furthermore, according to various exampleembodiments, modules described herein as being implemented within asingle machine, database, or device may be distributed across multiplemachines, databases, or devices.

The camera module 702 performs camera related operations, includingfunctionality for operations involving one or more cameras of theeyewear device 150. In an example, camera module 702 can access camerafunctionality across different processes that are executing on theeyewear device 150, determining surfaces for face or surface tracking,responding to various requests (e.g., involving image data of aparticular resolution or format) for camera data or image data (e.g.,frames) from such processes, providing metadata to such processes thatare consuming the requested camera data or image data. As mentionedherein, a “process” or “computing process” can refer to an instance of acomputer program that is being executed by one or more threads of agiven processor(s).

As mentioned herein, surface tracking refers to operations for trackingone or more representations of surfaces corresponding to planes (e.g., agiven horizontal plane, a floor, a table) in the input frame. In anexample, surface tracking is accomplished using hit testing and/or raycasting techniques. Hit testing, in an example, determines whether aselected point (e.g., pixel or set of pixels) in the input frameintersects with a surface or plane of a representation of a physicalobject in the input frame. Ray casting, in an example, utilizes aCartesian based coordinate system (e.g., x and y coordinates) andprojects a ray (e.g., vector) into the camera's view of the world, ascaptured in the input frame, to detect planes that the ray intersects.

As further illustrated, the camera module 702 receives the input frame(or alternatively a duplicate of the input frame in an embodiment). Thecamera module 702 can include various tracking functionality based on atype of object to track. In an example, the camera module 702 includestracking capabilities for surface tracking, face tracking, objecttracking, and the like. In an implementation, the camera module 702 mayonly execute one of each of a plurality of tracking processes at a timefor facilitating the management of computing resources at the clientdevice 102 or eyewear device 150. In addition, the camera module 702 mayperform one or more object recognition or detection operations on theinput frame.

As referred to herein, tracking refers to operations for determiningspatial properties (e.g., position and/or orientation) of a given object(or portion thereof) during a post-processing stage. In animplementation, during tracking, the object's position and orientationare measured in a continuous manner. Different objects may be tracked,such as a user's head, eyes, or limbs, surfaces, or other objects.Tracking involves dynamic sensing and measuring to enable virtualobjects and/or effects to be rendered with respect to physical objectsin a three-dimensional space corresponding to a scene (e.g., the inputframe). Thus, the camera module 702 determines metrics corresponding toat least the relative position and orientation of one or more physicalobjects in the input frame and includes these metrics in tracking datawhich is provided to the rendering module 708. In an example, the cameramodule 702 updates (e.g., track over time) such metrics from frame tosubsequent frame.

In an implementation, the camera module 702 provides, as output,tracking data (e.g., metadata) corresponding to the aforementionedmetrics (e.g., position and orientation). In some instances, the cameramodule 702 includes logic for shape recognition, edge detection, or anyother suitable object detection mechanism. The object of interest mayalso be determined by the camera module 702 to be an example of apredetermined object type, matching shapes, edges, or landmarks within arange to an object type of a set of predetermined object types.

In an implementation, the camera module 702 can utilize techniques whichcombines information from the device's motion sensors (e.g.,accelerometer and gyroscope sensors, and the like) with an analysis ofthe scene provided in the input frame. For example, the camera module702 detects features in the input frame, and as a result, tracksdifferences in respective positions of such features across severalinput frames using information derived at least in part on data from themotion sensors of the device.

As mentioned herein, face tracking refers to operations for trackingrepresentations of facial features, such as portions of a user's face,in the input frame. In some embodiments, the camera module 702 includesfacial tracking logic to identify all or a portion of a face within theone or more images and track landmarks of the face across the set ofimages of the video stream. As mentioned herein, object tracking refersto tracking a representation of a physical object in the input frame.

In an embodiment, the camera module 702 determines a gaze direction of auser wearing the eyewear device, and facilitates the generation of ARcontent based on the determined gaze direction. Examples of this arediscussed in further detail in FIG. 8A, FIG. 8B, and FIG. 9 below.

In an embodiment, the camera module 702 acts as an intermediary betweenother components of the AR content recording system 700 and the capturemodule 704. As mentioned above, the camera module 702 can receiverequests for captured image data from the image data processing module706. The camera module 702 can also receive requests for the capturedimage data from the content recording module 710. The camera module 702can forward such requests to the capture module 704 for processing.

The capture module 704 captures images (which may also include depthdata) captured by one or more cameras of eyewear device 150 (e.g., inresponse to the aforementioned requests from other components). Forexample, an image is a photograph captured by an optical sensor (e.g.,camera) of the eyewear device 150. An image includes one or morereal-world features, such as a user's face or real-world object(s)detected in the image. In sonic embodiments, an image includes metadatadescribing the image. Each captured image can be included in a datastructure mentioned herein as a “frame”, which can include the raw imagedata along with metadata and other information. In an embodiment,capture module 704 can send captured image data and metadata as(captured) frames to one or more components of the AR content recordingsystem 700. The sending of the captured frames can occur asynchronously,which may cause synchronization issues as one component might receiveand process a given frame slightly before or after another componentreceives and processes the same frame. In applications for rendering AReffects and AR environments, such synchronization issues can result in aperceived lag from the viewpoint of the user (e.g., a glitch orperception of non-responsiveness), which reduces and detracts from theimmersive experience of the AR environments. As discussed further below,embodiments of the subject technology therefore enables generating timeinformation for each captured frame (e.g., timestamps) to facilitatesynchronization of operations and improve rendering of AR effects and ARenvironments which a presented to the viewing user of the eyewear device150.

The image data processing module 706 generates tracking data and othermetadata for captured image data, including metadata associated withoperations for generating AR content and AR effects applied to thecaptured image data. The image data processing module 706 performsoperations on the received image data. For example, various imageprocessing operations are performed by the image data processing module706. The image data processing module 706 performs various operationsbased on algorithms or techniques that correspond to animations and/orproviding visual and/or auditory effects to the received image data. Inan embodiment, a given augmented reality content generator can utilizethe image data processing module 706 to perform operations as part ofgenerating AR content and AR effects which is then provided to arendering process to render such AR content and AR effects (e.g.,including 2D effects or 3D effects) and the like.

The rendering module 708 performs rendering of AR content for display bythe eyewear system 160 based on data provided by at least one of theaforementioned modules. In an example, the rendering module 708 utilizesa graphical processing pipeline to perform graphical operations torender the AR content for display. The rendering module 708 implements,in an example, an extensible rendering engine which supports multipleimage processing operations corresponding to respective augmentedreality content generators. In an example, the rendering module 708 canreceive a composite AR content item for rendering on a display providedby eyewear device 150.

in some implementations, the rendering module 708 provide a graphicssystem that renders two-dimensional (2D) objects or objects from athree-dimensional (3D) world (real or imaginary) onto a 2D displayscreen. Such a graphics system (e.g., one included on the eyewear device150) includes a graphics processing unit (GPU) in some implementationsfor performing image processing operations and rendering graphicalelements for display.

In an implementation, the GPU includes a logical graphical processingpipeline, which can receive a representation of a 2D or 3D scene andprovide an output of a bitmap that represents a 2D image for display.Existing application programming interfaces (APIs) have implementedgraphical pipeline models. Examples of such APIs include the OpenGraphics Library (OPENGL) API and the METAL API. The graphicalprocessing pipeline includes a number of stages to convert a group ofvertices, textures, buffers, and state information into an image frameon the screen, In an implementation, one of the stages of the graphicalprocessing pipeline is a shader, which may be utilized as part of aparticular augmented reality content generator that is applied to aninput frame (e.g., image or video). A shader can be implemented as coderunning on a specialized processing unit, also referred to as a shaderunit or shader processor, usually executing several computing threads,programmed to generate appropriate levels of color and/or specialeffects to fragments being rendered. For example, a vertex shaderprocesses attributes (position, texture coordinates, color, etc.) of avertex, and a pixel shader processes attributes (texture values, color,z-depth and alpha value) of a pixel. In some instances, a pixel shaderis referred to as a fragment shader.

It is to be appreciated that other types of shader processes may beprovided. In an example, a particular sampling rate is utilized, withinthe graphical processing pipeline, for rendering an entire frame, and/orpixel shading is performed at a particular per-pixel rate. In thismanner, a given electronic device (e.g., the eyewear device 150)operates the graphical processing pipeline to convert informationcorresponding to objects into a bitmap that can be displayed by theelectronic device.

The content recording module 710 sends a request(s) to the camera module702 to initiate recording of image data by one or more cameras providedby the eyewear device 150. In an embodiment, the camera module 702 actsas intermediary between other components in the AR content recordingsystem. For example, the camera module can receive a request from thecontent recording module 710 to initiate recording, and forward therequest to the capture module 704 for processing. The capture module704, upon receiving the request from the camera module 702, performsoperations to initiate image data capture by the camera(s) provided bythe eyewear device 150. Captured image data, including timestampinformation for each frame from the captured image data, can then besent to the content recording module 710 for processing. In an example,the content recording module 710 can perform operations to processcaptured image data for rendering by the rendering module 708.

In an embodiment, components of the AR content recording system 700 cancommunicate using an inter-process communication (IPC) protocol, In anembodiment, components of the AR content recording system 700 cancommunicate through an API provided by the AR content recording system700.

In an embodiment, the camera module 702 receives a signal or command (ora request) to stop recording of image data (e.g., sent from the contentrecording module 710). In response, the camera module 702 sends arequest to the capture module 704 to stop capturing image data. Thecapture module 704, in response to the request to stop recording,complies with the request and ceases further operations to capture imagedata using one or more cameras of the eyewear device 150. The cameramodule 702, after receiving the signal or command to stop recording, canalso asynchronously send a signal to the image data processing module706 that recording of image data (e.g., capture of image data by thecapture module 704) has (requested to be) stopped. The image dataprocessing module 706, after receiving the signal, performs operationsto complete or finish image processing operations, including performingoperations to generate metadata related to AR content items and AReffects. Such metadata can then be sent to the capture module 704, whichthen generates a composite AR content item, including the metadata. Thecomposite AR content item can be received by the rendering module 708and rendered for display on a display device provided by the eyeweardevice 150.

FIGS. 8A and 8B illustrate examples of tracking a gaze direction toperform an augmented reality operation(s) in accordance withimplementations of the subject technology. The following discussionrelates to components of the eyewear device 150, which includes variouscameras to enable tracking a gaze direction of eyes of a user's face.

As shown in FIG. 8A, images are captured and analyzed at least onecamera of the eyewear device 150 to determine the relative positions ofeyes of user 801 within a field of view 820. In an implementation, theeyewear device 150 can differentiate the user's pupils, and can utilizethe relative position of the pupils with respect to the eye position todetermine a gaze direction. For example, in FIG. 8B, the eyewear device150 can use the detected position of the user's pupils relative to theuser's eyes, and determine an area on the display of the eyewear device150 at which the user 801 is looking within a field of view 820.Additionally, in an implementation, the eyewear device 150 can alsodetect movements such as a user closing his or her eyes for a particularperiod of time, which may be used to initiate one or more operations bythe eyewear system 160.

In an embodiment, to determine a gaze direction of a user, the cameramodule 702 determine a relative position of the user relative to theeyewear device 150, as well as dimensions or other aspects of the userat that position, which includes determining relative positions of theuser's head and the user's eyes. In an example, the camera module 702can differentiate the user's pupils, the system can also utilize therelative position of the pupils with respect to the eye position. In anexample, the user is looking left (e.g., to the user's right), thecamera module 702 determines that a center point of each user's pupil isto the left (e.g., in image data) of the center point of the respectiveeye. In an example where the user is looking “down”, the camera module702 determines that positions of the pupils have moved below a centerpoint of the eyes. In an example where the user is looking “up”, thecamera module 702 determines that positions of the pupils have movedabove a center point of the eyes. The position of the pupils can changewithout the user moving his or her head, and in an example, the cameramodule 702 can therefore detect a gaze direction without a change in theuser's head position. The eyewear system 160 can generate AR contentbased on the detected position of the user's pupils relative to theuser's eyes, and the eyewear system 160 can render the AR content in adetermined area on the display of the eyewear device 150 at which theuser is currently looking.

FIG. 9 illustrates examples of AR content generated in a field of viewof a user based on a determined gaze direction of the user while usingthe eyewear device 150.

As shown in a first AR environment 900, a field of view 910 includes ananchor point 915 based on a determined gaze direction of a user, Asurface 920 corresponding to a ground plane in the field of view 910 isidentified. In an embodiment, a distance between the surface 920 and theanchor point 915 is determined. Based on the distance, AR content 925(e.g., virtual AR snowballs) is generated and rendered for display bythe eyewear system 160.

As shown in a second AR environment 950, a field of view 960 includesthe anchor point 915 based on the determined gaze direction of the user.AR content 970, representing a set of AR content items (e.g., virtual ARsnowballs), has been generated and rendered in the field of view 960based at least in part on a determined distance between the anchor point915 and the identified surface 920. As further shown, AR content 975 hasalso been generated and rendered for display by the eyewear system 160,which in this example, will be animated to fall into position on top ofthe AR content 970.

FIG. 10 is a flowchart illustrating a method 1000, according to certainexample embodiments, The method 1000 may be embodied incomputer-readable instructions for execution by one or more computerprocessors such that the operations of the method 1000 may be performedin part or in whole by the eyewear device 150, particularly with respectto respective components of the AR content recording system 700described above in FIG. 7; accordingly, the method 1000 is describedbelow by way of example with reference thereto. However, it shall beappreciated that at least some of the operations of the method 1000 maybe deployed on various other hardware configurations and the method 1000is not intended to be limited to the AR content recording system 700.

At operation 1002, the camera module 702 determines a gaze direction ina field of view of a user using an eyewear device (e.g., the eyeweardevice 150).

At operation 1004, the camera module 702 generates an anchor point inthe field of view based at least in part on the determined gazedirection.

At operation 1006, the camera module 702 identifies a surfacecorresponding to a ground plane in the field of view.

At operation 1008, the camera module 702 determines a distance from theidentified surface to the anchor point.

At operation 1010, the image data processing module 706 generates ARcontent based at least in part on the determined distance.

At operation 1012, the rendering module 708 renders the generated ARcontent in the field of view for display by the eyewear device (e.g.,the eyewear device 150).

In embodiments, the camera module 702 generates the anchor point whichcomprises performing a ray casting operation, based at least in part onthe gaze direction, to select a point in the field of view, the pointcorresponding to the anchor point.

In embodiments, the ray casting operation comprises: determining alocation of a pupil or iris of the user, projecting a ray, from thelocation of the pupil or iris, in a direction toward the field of view,the field of view comprising a set of pixels, determining at least onepixel from the field of view that intersects the ray, and selecting theat least one pixel as the anchor point.

The camera module 702 determines the gaze direction is based on a headorientation and a relative position of a pupil or iris of the user usingthe eyewear device.

In embodiments, the camera module 702 identifies the surfacecorresponding to the ground plane is based on a surface detectionprocess.

In embodiments, the surface detection process comprises generating apoint cloud based on the field of view, the point cloud comprising a setof feature points, each feature point include a set of respective x, y,and z coordinates in a three-dimensional space, and performing hittesting on the point cloud to determine a first surface plane in thefield of view, the hit testing determining an intersection of at leastone feature point corresponding to the first surface plane below amedian feature point in the point cloud.

In embodiments, the camera module 702 performs hit testing thatcomprises generating a three-dimensional line that includes a startingposition corresponding to a position of a pupil or iris of the user andextends from the gaze direction to the one feature point correspondingto the first surface plane in the field of view.

In embodiments, the camera module 702 determines the distance from theidentified surface to the anchor point which comprises generating asecond anchor point within the identified surface, determining a firstdistance between the second anchor point and the anchor point in thefield of view, the second anchor point being at a position belowrelative to the anchor point, and selecting a particular position alongthe first distance between the second anchor point and the anchor point.

In embodiments, the image data processing module 706 renders thegenerated augmented reality content in the field of view for display bythe eyewear device which comprises generating a first three-dimensionalobject, rendering the first three-dimensional object at the particularposition, generating a second three-dimensional object, and renderingthe second three-dimensional object at a second position above or belowthe first three-dimensional object.

In embodiments, the first three-dimensional object is different type ofobject than the second three-dimensional object, or the firstthree-dimensional object is a same type of object as the secondthree-dimensional object.

FIG. 11 is a block diagram illustrating an example software architecture1106, which may be used in conjunction with various hardwarearchitectures herein described. FIG. 11 is a non-limiting example of asoftware architecture and it will be appreciated that many otherarchitectures may be implemented to facilitate the functionalitydescribed herein. The software architecture 1106 may execute on hardwaresuch as machine 1200 of FIG. 12 that includes, among other things,processors 1204, memory 1214, and (input/output) I/O components 1218. Arepresentative hardware layer 1152 is illustrated and can represent, forexample, the machine 1200 of FIG. 12. The representative hardware layer1152 includes a processing unit 1154 having associated executableinstructions 1104. Executable instructions 1104 represent the executableinstructions of the software architecture 1106, including implementationof the methods, components, and so forth described herein. The hardwarelayer 1152 also includes memory and/or storage modules memory/storage1156, which also have executable instructions 1104. The hardware layer1152 may also comprise other hardware 1158.

In the example architecture of FIG. 11, the software architecture 1106may be conceptualized as a stack of layers where each layer providesparticular functionality. For example, the software architecture 1106may include layers such as an operating system 1102, libraries 1120,frameworks/middleware 1118, applications 1116, and a presentation layer1114. Operationally, the applications 1116 and/or other componentswithin the layers may invoke API calls 1108 through the software stackand receive a response as in messages 1112 to the API calls 1108. Thelayers illustrated are representative in nature and not all softwarearchitectures have all layers. For example, some mobile or specialpurpose operating systems may not provide a frameworks/middleware 1118,while others may provide such a layer. Other software architectures mayinclude additional or different layers.

The operating system 1102 may manage hardware resources and providecommon services. The operating system 1102 may include, for example, akernel 1122, services 1124, and drivers 1126. The kernel 1122 may act asan abstraction layer between the hardware and the other software layers.For example, the kernel 1122 may be responsible for memory management,processor management (e.g., scheduling), component management,networking, security settings, and so on. The services 1124 may provideother common services for the other software layers. The drivers 1126are responsible for controlling or interfacing with the underlyinghardware. For instance, the drivers 1126 include display drivers, cameradrivers, Bluetooth® drivers, flash memory drivers, serial communicationdrivers (e.g., Universal Serial Bus (USB) drivers), Wi-Fi® drivers,audio drivers, power management drivers, and so forth depending on thehardware configuration.

The libraries 1120 provide a common infrastructure that is used by theapplications 1116 and/or other components and/or layers. The libraries1120 provide functionality that allows other software components toperform tasks in an easier fashion than to interface directly with theunderlying operating system 1102 functionality (e.g., kernel 1122,services 1124 and/or drivers 1126). The libraries 1120 may includesystem libraries 1144 (e.g., C standard library) that may providefunctions such as memory allocation functions, string manipulationfunctions, mathematical functions, and the like. In addition, thelibraries 1120 may include API libraries 1146 such as media libraries(e.g., libraries to support presentation and manipulation of variousmedia format such as MPREG4, H.264, MP3, AAC, AMR, JPG, PNG), graphicslibraries (e.g., an OpenGL framework that may be used to render 2D and3D in a graphic content on a display), database libraries (e.g., SQLitethat may provide various relational database functions), web libraries(e.g., WebKit that may provide web browsing functionality), and thelike. The libraries 1120 may also include a wide variety of otherlibraries 1148 to provide many other APIs to the applications 1116 andother software components/modules.

The frameworks/middleware 1118 (also sometimes referred to asmiddleware) provide a higher-level common infrastructure that may beused by the applications 1116 and/or other software components/modules.For example, the frameworks/middleware 1118 may provide various graphicuser interface (GUI) functions, high-level resource management,high-level location services, and so forth. The frameworks/middleware1118 may provide a broad spectrum of other APIs that may be used by theapplications 1116 and/or other software components/modules, some ofwhich may be specific to a particular operating system 1102 or platform.

The applications 1116 include built-in applications 1138 and/orthird-party applications 1140. Examples of representative built-inapplications 1138 may include, but are not limited to, a contactsapplication, a browser application, a book reader application, alocation application, a media application, a messaging application,and/or a game application. Third-party applications 1140 may include anapplication developed using the ANDROID™ or IOS™ software developmentkit (SDK) by an entity other than the vendor of the particular platform,and may be mobile software running on a mobile operating system such asIOS™, DROID™, WINDOWS® Phone, or other mobile operating systems. Thethird-party applications 1140 may invoke the API calls 1108 provided bythe mobile operating system (such as operating system 1102) tofacilitate functionality described herein.

The applications 1116 may use built in operating system functions (e.g.,kernel 1122, services 1124 and/or drivers 1126), libraries 1120, andframeworks/middleware 1118 to create user interfaces to interact withusers of the system. Alternatively, or additionally, in some systemsinteractions with a user may occur through a presentation layer, such aspresentation layer 1114. In these systems, the application/component‘logic’ can be separated from the aspects of the application/componentthat interact with a user.

FIG. 12 is a block diagram illustrating components of a machine 1200,according to some example embodiments, able to read instructions from amachine-readable medium (e.g., a machine-readable storage medium) andperform any one or more of the methodologies discussed herein.Specifically, FIG. 12 shows a diagrammatic representation of the machine1200 in the example form of a computer system, within which instructions1210 (e.g., software, a program, an application, an applet, an app, orother executable code) for causing the machine 1200 to perform any oneor more of the methodologies discussed herein may be executed. As such,the instructions 1210 may be used to implement modules or componentsdescribed herein. The instructions 1210 transform the general,non-programmed machine 1200 into a particular machine 1200 programmed tocarry out the described and illustrated functions in the mannerdescribed. In alternative embodiments, the machine 1200 operates as astandalone device or may be coupled (e.g., networked) to other machines.In a networked deployment, the machine 1200 may operate in the capacityof a server machine or a client machine in a server-client networkenvironment, or as a peer machine in a peer-to-peer (or distributed)network environment, The machine 1200 may comprise, but not be limitedto, a server computer, a client computer, a personal computer (PC), atablet computer, a laptop computer, a netbook, a set-top box (STB), apersonal digital assistant (PDA), an entertainment media system, acellular telephone, a smart phone, a mobile device, a wearable device(e.g., a smart watch), a smart home device (e.g., a smart appliance),other smart devices, a web appliance, a network router, a networkswitch, a network bridge, or any machine capable of executing theinstructions 1210, sequentially or otherwise, that specify actions to betaken by machine 1200. Further, while only a single machine 1200 isillustrated, the term ‘machine’ shall also be taken to include acollection of machines that individually or jointly execute theinstructions 1210 to perform any one or more of the methodologiesdiscussed herein.

The machine 1200 may include processors 1204, including processor 1208to processor 1212, memory/storage 1206, and I/O components 1218, whichmay be configured to communicate with each other such as via a bus 1202,The memory/storage 1206 may include a memory 1214, such as a mainmemory, or other memory storage, and a storage unit 1216, bothaccessible to the processors 1204 such as via the bus 1202. The storageunit 1216 and memory 1214 store the instructions 1210 embodying any oneor more of the methodologies or functions described herein. Theinstructions 1210 may also reside, completely or partially, within thememory 1214, within the storage unit 1216, within at least one of theprocessors 1204 (e.g., within the processor's cache memory), or anysuitable combination thereof, during execution thereof by the machine1200. Accordingly, the memory 1214, the storage unit 1216, and thememory of processors 1204 are examples of machine-readable media.

The I/O components 1218 may include a wide variety of components toreceive input, provide output, produce output, transmit information,exchange information, capture measurements, and so on. The specific I/Ocomponents 1218 that are included in a particular machine 1200 willdepend on the type of machine. For example, portable machines such asmobile phones will likely include a touch input device or other suchinput mechanisms, while a headless server machine will likely notinclude such a touch input device. It will be appreciated that the I/Ocomponents 1218 may include many other components that are not shown inFIG. 12. The I/O components 1218 are grouped according to functionalitymerely for simplifying the following discussion and the grouping is inno way limiting. In various example embodiments, the I/O components 1218may include output components 1226 and input components 1228. The outputcomponents 1226 may include visual components (e.g., a display such as aplasma display panel (PDP), a light emitting diode (LED) display, aliquid crystal display (LCD), a projector, or a cathode ray tube (CRT)),acoustic components (e.g., speakers), haptic components (e.g., avibratory motor, resistance mechanisms), other signal generators, and soforth. The input components 1228 may include alphanumeric inputcomponents (e.g., a keyboard, a touch screen configured to receivealphanumeric input, a photo-optical keyboard, or other alphanumericinput components), point based input components (e.g., a mouse, atouchpad, a trackball, a joystick, a motion sensor, or other pointinginstrument), tactile input components (e.g., a physical button, a touchscreen that provides location and/or force of touches or touch gestures,or other tactile input components), audio input components (e.g., amicrophone), and the like.

In further example embodiments, the I/O components 1218 may includebiometric components 1230, motion components 1234, environmentalcomponents 1236, or position components 1238 among a wide array of othercomponents. For example, the biometric components 1230 may includecomponents to detect expressions (e.g., hand expressions, facialexpressions, vocal expressions, body gestures, or eye tracking), measurebiosignals (e.g., blood pressure, heart rate, body temperature,perspiration, or brain waves), identify a person (e.g., voiceidentification, retinal identification, facial identification,fingerprint identification, or electroencephalogram basedidentification), and the like. The motion components 1234 may includeacceleration sensor components (e.g., accelerometer), gravitation sensorcomponents, rotation sensor components (e.g., gyroscope), and so forth.The environmental components 1236 may include, for example, illuminationsensor components (e.g., photometer), temperature sensor components(e.g., one or more thermometer that detect ambient temperature),humidity sensor components, pressure sensor components (e.g.,barometer), acoustic sensor components (e.g., one or more microphonesthat detect background noise), proximity sensor components (e.g.,infrared sensors that detect nearby objects), gas sensors (e.g., gasdetection sensors to detection concentrations of hazardous gases forsafety or to measure pollutants in the atmosphere), or other componentsthat may provide indications, measurements, or signals corresponding toa surrounding physical environment. The position components 1238 mayinclude location sensor components (e.g., a GPS receiver component),altitude sensor components (e.g., altimeters or barometers that detectair pressure from which altitude may be derived), orientation sensorcomponents (e.g., magnetometers), and the like.

Communication may be implemented using a wide variety of technologies.The I/O components 1218 may include communication components 1240operable to couple the machine 1200 to a network 1232 or devices 1220via coupling 1224 and coupling 1222, respectively. For example, thecommunication components 1240 may include a network interface componentor other suitable device to interface with the network 1232. In furtherexamples, communication components 1240 may include wired communicationcomponents, wireless communication components, cellular communicationcomponents, Near Field Communication (NFC) components, Bluetooth®components (e.g., Bluetooth® Low Energy), Wi-Fi® components, and othercommunication components to provide communication via other modalities.The devices 1220 may be another machine or any of a wide variety ofperipheral devices (e.g., a peripheral device coupled via a USB).

Moreover, the communication components 1240 may detect identifiers orinclude components operable to detect identifiers. For example, thecommunication components 1240 may include Radio Frequency identification(RFID) tag reader components, NFC smart tag detection components,optical reader components (e.g., an optical sensor to detectone-dimensional bar codes such as Universal Product Code (UPC) bar code,multi-dimensional bar codes such as Quick Response (QR) code, Azteccode, Data Matrix, Dataglyph, MaxiCode, PDF417, Ultra Code, UCC RSS-2Dbar code, and other optical codes), or acoustic detection components(e.g., microphones to identify tagged audio signals). In addition, avariety of information may be derived via the communication components1240, such as, location via Internet Protocol (IP) geo-location,location via Wi-Fi® signal triangulation, location via detecting a NFCbeacon signal that may indicate a particular location, and so forth.

The following discussion relates to various terms or phrases that arementioned throughout the subject disclosure.

‘Signal Medium’ refers to any intangible medium that is capable ofstoring, encoding, or carrying the instructions for execution by amachine and includes digital or analog communications signals or otherintangible media to facilitate communication of software or data. Theterm ‘signal medium’ shall be taken to include any form of a modulateddata signal, carrier wave, and so forth. The term ‘modulated datasignal’ means a signal that has one or more of its characteristics setor changed in such a matter as to encode information in the signal. Theterms ‘transmission medium’ and ‘signal medium’ mean the same thing andmay be used interchangeably in this disclosure.

‘Communication Network’ refers to one or more portions of a network thatmay be an ad hoc network, an intranet, an extranet, a virtual privatenetwork (VPN), a local area network (LAN), a wireless LAN (WLAN), a widearea network (WAN), a wireless WAN (WWAN), a metropolitan area network(MAN), the Internet, a portion of the Internet, a portion of the PublicSwitched Telephone Network (PSTN), a plain old telephone service (POTS)network, a cellular telephone network, a wireless network, a Wi-Fi®network, another type of network, or a combination of two or more suchnetworks. For example, a network or a portion of a network may include awireless or cellular network and the coupling may be a Code DivisionMultiple Access (CDMA) connection, a Global System for Mobilecommunications (GSM) connection, or other types of cellular or wirelesscoupling. In this example, the coupling may implement any of a varietyof types of data transfer technology, such as Single Carrier RadioTransmission Technology (1xRTT), Evolution-Data Optimized (EVDO)technology, General Packet Radio Service (GPRS) technology, EnhancedData rates for GSM Evolution (EDGE) technology, third GenerationPartnership Project (3GPP) including 3G, fourth generation wireless (4G)networks, Universal Mobile Telecommunications System (UMTS), High SpeedPacket Access (HSPA), Worldwide Interoperability for Microwave Access(WiMAX), Long Term Evolution (LTE) standard, others defined by variousstandard-setting organizations, other long-range protocols, or otherdata transfer technology.

‘Processor’ refers to any circuit or virtual circuit (a physical circuitemulated by logic executing on an actual processor) that manipulatesdata values according to control signals (e.g., ‘commands’, ‘op codes’,‘machine code’, etc.) and which produces corresponding output signalsthat are applied to operate a machine. A processor may, for example, bea Central Processing Unit (CPU), a Reduced Instruction Set Computing(RISC) processor, a Complex Instruction Set Computing (CISC) processor,a Graphics Processing Unit (GPU), a Digital Signal Processor (DSP), anApplication Specific integrated Circuit (ASIC), a Radio-FrequencyIntegrated Circuit (RTIC) or any combination thereof. A processor mayfurther be a multi-core processor having two or more independentprocessors (sometimes referred to as ‘cores’) that may executeinstructions contemporaneously.

‘Machine-Storage Medium’ refers to a single or multiple storage devicesand/or media (e.g., a centralized or distributed database, and/orassociated caches and servers) that store executable instructions,routines and/or data. The term shall accordingly be taken to include,but not be limited to, solid-state memories, and optical and magneticmedia, including memory internal or external to processors. Specificexamples of machine-storage media, computer-storage media and/ordevice-storage media include non-volatile memory, including by way ofexample semiconductor memory devices, e.g., erasable programmableread-only memory (EPROM), electrically erasable programmable read-onlymemory (EEPROM), FPGA, and flash memory devices; magnetic disks such asinternal hard disks and removable disks; magneto-optical disks; andCD-ROM and DVD-ROM disks The terms ‘machine-storage medium,’‘device-storage medium,’ ‘computer-storage medium’ mean the same thingand may be used interchangeably in this disclosure. The terms‘machine-storage media,’ ‘computer-storage media,’ and ‘device-storagemedia’ specifically exclude carrier waves, modulated data signals, andother such media, at least some of which are covered under the term‘signal medium.’

‘Component’ refers to a device, physical entity, or logic havingboundaries defined by function or subroutine calls, branch points, APIs,or other technologies that provide for the partitioning ormodularization of particular processing or control functions. Componentsmay be combined via their interfaces with other components to carry outa machine process. A component may be a packaged functional hardwareunit designed for use with other components and a part of a program thatusually performs a particular function of related functions. Componentsmay constitute either software components (e.g., code embodied on amachine-readable medium) or hardware components. A ‘hardware component’is a tangible unit capable of performing certain operations and may beconfigured or arranged in a certain physical manner. In various exampleembodiments, one or more computer systems (e.g., a standalone computersystem, a client computer system, or a server computer system) or one ormore hardware components of a computer system (e.g., a processor or agroup of processors) may be configured by software (e.g., an applicationor application portion) as a hardware component that operates to performcertain operations as described herein. A hardware component may also beimplemented mechanically, electronically, or any suitable combinationthereof. For example, a hardware component may include dedicatedcircuitry or logic that is permanently configured to perform certainoperations. A hardware component may be a special-purpose processor,such as a field-programmable gate array (FPGA) or an applicationspecific integrated circuit (ASIC). A hardware component may alsoinclude programmable logic or circuitry that is temporarily configuredby software to perform certain operations. For example, a hardwarecomponent may include software executed by a general-purpose processoror other programmable processor. Once configured by such software,hardware components become specific machines (or specific components ofa machine) uniquely tailored to perform the configured functions and areno longer general-purpose processors. It will be appreciated that thedecision to implement a hardware component mechanically, in dedicatedand permanently configured circuitry, or in temporarily configuredcircuitry (e.g., configured by software), may be driven by cost and timeconsiderations. Accordingly, the phrase ‘hardware component’(or‘hardware-implemented component’) should be understood to encompass atangible entity, be that an entity that is physically constructed,permanently configured (e.g., hardwired), or temporarily configured(e.g., programmed) to operate in a certain manner or to perform certainoperations described herein. Considering embodiments in which hardwarecomponents are temporarily configured (e.g., programmed), each of thehardware components need not be configured or instantiated at any oneinstance in time. For example, where a hardware component comprises ageneral-purpose processor configured by software to become aspecial-purpose processor, the general-purpose processor may beconfigured as respectively different special-purpose processors (e.g.,comprising different hardware components) at different times. Softwareaccordingly configures a particular processor or processors, forexample, to constitute a particular hardware component at one instanceof time and to constitute a different hardware component at a differentinstance of time. Hardware components can provide information to, andreceive information from, other hardware components. Accordingly, thedescribed hardware components may be regarded as being communicativelycoupled. Where multiple hardware components exist contemporaneously,communications may be achieved through signal transmission (e.g., overappropriate circuits and buses) between or among two or more of thehardware components. In embodiments in which multiple hardwarecomponents are configured or instantiated at different times,communications between such hardware components may be achieved, forexample, through the storage and retrieval of information in memorystructures to which the multiple hardware components have access. Forexample, one hardware component may perform an operation and store theoutput of that operation in a memory device to which it iscommunicatively coupled. A further hardware component may then, at alater time, access the memory device to retrieve and process the storedoutput. Hardware components may also initiate communications with inputor output devices, and can operate on a resource (e.g., a collection ofinformation). The various operations of example methods described hereinmay be performed, at least partially, by one or more processors that aretemporarily configured (e.g., by software) or permanently configured toperform the relevant operations. Whether temporarily or permanentlyconfigured, such processors may constitute processor-implementedcomponents that operate to perform one or more operations or functionsdescribed herein. As used herein, ‘processor-implemented component’refers to a hardware component implemented using one or more processors.Similarly, the methods described herein may be at least partiallyprocessor-implemented, with a particular processor or processors beingan example of hardware. For example, at least some of the operations ofa method may be performed by one or more processors orprocessor-implemented components. Moreover, the one or more processorsmay also operate to support performance of the relevant operations in a‘cloud computing’ environment or as a ‘software as a service’ (SaaS).For example, at least some of the operations may be performed by a groupof computers (as examples of machines including processors), with theseoperations being accessible via a network (e.g., the Internet) and viaone or more appropriate interfaces (e.g., an API). The performance ofcertain of the operations may be distributed among the processors, notonly residing within a single machine, but deployed across a number ofmachines. In some example embodiments, the processors orprocessor-implemented components may be located in a single geographiclocation (e.g., within a home environment, an office environment, or aserver farm). In other example embodiments, the processors orprocessor-implemented components may be distributed across a number ofgeographic locations.

‘Carrier Signal’ refers to any intangible medium that is capable ofstoring, encoding, or carrying instructions for execution by themachine, and includes digital or analog communications signals or otherintangible media to facilitate communication of such instructions.Instructions may be transmitted or received over a network using atransmission medium via a network interface device.

‘Computer-Readable Medium’ refers to both machine-storage media andtransmission media. Thus, the terms include both storage devices/mediaand carrier waves/modulated data signals. The terms ‘machine-readablemedium,’ ‘computer-readable medium’ and ‘device-readable medium’ meanthe same thing and may be used interchangeably in this disclosure.

‘Client Device’ refers to any machine that interfaces to acommunications network to obtain resources from one or more serversystems or other client devices. A client device may be, but is notlimited to, a mobile phone, desktop computer, laptop, portable digitalassistants (PDAs), smartphones, tablets, ultrabooks, netbooks, laptops,multi-processor systems, microprocessor-based or programmable consumerelectronics, game consoles, set-top boxes, or any other communicationdevice that a user may use to access a network. In the subjectdisclosure, a client device is also referred to as an ‘electronicdevice.’

‘Ephemeral Message’ refers to a message that is accessible for atime-limited duration. An ephemeral message may be a text, an image, avideo and the like. The access time for the ephemeral message may be setby the message sender. Alternatively, the access time may be a defaultsetting or a setting specified by the recipient. Regardless of thesetting technique, the message is transitory.

‘Signal Medium’ refers to any intangible medium that is capable ofstoring, encoding, or carrying the instructions for execution by amachine and includes digital or analog communications signals or otherintangible media to facilitate communication of software or data. Theterm ‘signal medium’ shall be taken to include any form of a modulateddata signal, carrier wave, and so forth. The term ‘modulated datasignal’ means a signal that has one or more of its characteristics setor changed in such a matter as to encode information in the signal. Theterms ‘transmission medium’ and ‘signal medium’ mean the same thing andmay be used interchangeably in this disclosure.

‘Communication Network’ refers to one or more portions of a network thatmay be an ad hoc network, an intranet, an extranet, a virtual privatenetwork (VPN), a local area network (LAN), a wireless LAN (WLAN), a widearea network (WAN), a wireless WAN (WWAN), a metropolitan area network(MAN), the Internet, a portion of the Internet, a portion of the PublicSwitched Telephone Network (PSTN), a plain old telephone service (POTS)network, a cellular telephone network, a wireless network, a Wi-Fi®network, another type of network, or a combination of two or more suchnetworks. For example, a network or a portion of a network may include awireless or cellular network and the coupling may be a Code DivisionMultiple Access (CDMA) connection, a Global System for Mobilecommunications (GSM) connection, or other types of cellular or wirelesscoupling. In this example, the coupling may implement any of a varietyof types of data transfer technology, such as Single Carrier RadioTransmission Technology (1xRTT), Evolution-Data Optimized (EVDO)technology, General Packet Radio Service (GPRS) technology, EnhancedData rates for GSM Evolution (EDGE) technology, third GenerationPartnership Project (3GPP) including 3G, fourth generation wireless (4G)networks, Universal Mobile Telecommunications System (UMTS), High SpeedPacket Access (HSPA), Worldwide interoperability for Microwave Access(WiMAX), Long Term Evolution (LTE) standard, others defined by variousstandard-setting organizations, other long-range protocols, or otherdata transfer technology.

‘Processor’ refers to any circuit or virtual circuit (a physical circuitemulated by logic executing on an actual processor) that manipulatesdata values according to control signals (e.g., ‘commands’, ‘op codes’,‘machine code’, etc.) and which produces corresponding output signalsthat are applied to operate a machine. A processor may, for example, bea Central Processing Unit (CPU), a Reduced Instruction Set Computing(RISC) processor, a Complex instruction Set Computing (CISC) processor,a Graphics Processing Unit (GPU), a Digital Signal Processor (DSP), anApplication Specific Integrated Circuit (ASIC), a Radio-FrequencyIntegrated Circuit (RFIC) or any combination thereof. A processor mayfurther be a multi-core processor having two or more independentprocessors (sometimes referred to as ‘cores’) that may executeinstructions contemporaneously.

‘Machine-Storage Medium’ refers to a single or multiple storage devicesand/or media (e.g., a centralized or distributed database, and/orassociated caches and servers) that store executable instructions,routines and/or data. The term shall accordingly be taken to include,but not be limited to, solid-state memories, and optical and magneticmedia, including memory internal or external to processors. Specificexamples of machine-storage media, computer-storage media and/ordevice-storage media include non-volatile memory, including by way ofexample semiconductor memory devices, e.g., erasable programmableread-only memory (EPROM), electrically erasable programmable read-onlymemory (EEPROM), FPGA, and flash memory devices; magnetic disks such asinternal hard disks and removable disks; magneto-optical disks; andCD-ROM and DVD-ROM disks. The terms ‘machine-storage medium,’device-storage medium,' computer-storage medium' mean the same thing andmay be used interchangeably in this disclosure. The terms‘machine-storage media,’ ‘computer-storage media,’ and ‘device-storagemedia’ specifically exclude carrier waves, modulated data signals, andother such media, at least some of which are covered under the term‘signal medium.’

‘Component’ refers to a device, physical entity, or logic havingboundaries defined by function or subroutine calls, branch points, APIs,or other technologies that provide for the partitioning ormodularization of particular processing or control functions. Componentsmay be combined via their interfaces with other components to carry outa machine process. A component may be a packaged functional hardwareunit designed for use with other components and a part of a program thatusually performs a particular function of related functions. Componentsmay constitute either software components (e.g., code embodied on amachine-readable medium) or hardware components. A ‘hardware component’is a tangible unit capable of performing certain operations and may beconfigured or arranged in a certain physical manner. In various exampleembodiments, one or more computer systems (e.g., a standalone computersystem, a client computer system, or a server computer system) or one ormore hardware components of a computer system (e.g., a processor or agroup of processors) may be configured by software (e.g., an applicationor application portion) as a hardware component that operates to performcertain operations as described herein. A hardware component may also beimplemented mechanically, electronically, or any suitable combinationthereof. For example, a hardware component may include dedicatedcircuitry or logic that is permanently configured to perform certainoperations. A hardware component may be a special-purpose processor,such as a field-programmable gate array (FPGA) or an applicationspecific integrated circuit (ASIC). A hardware component may alsoinclude programmable logic or circuitry that is temporarily configuredby software to perform certain operations. For example, a hardwarecomponent may include software executed by a general-purpose processoror other programmable processor. Once configured by such software,hardware components become specific machines (or specific components ofa machine) uniquely tailored to perform the configured functions and areno longer general-purpose processors. it will be appreciated that thedecision to implement a hardware component mechanically, in dedicatedand permanently configured circuitry, or in temporarily configuredcircuitry (e.g., configured by software), may be driven by cost and timeconsiderations. Accordingly, the phrase ‘hardware component’(or‘hardware-implemented component’) should be understood to encompass atangible entity, be that an entity that is physically constructed,permanently configured (e.g., hardwired), or temporarily configured(e.g., programmed) to operate in a certain manner or to perform certainoperations described herein. Considering embodiments in which hardwarecomponents are temporarily configured (e.g., programmed), each of thehardware components need not be configured or instantiated at any oneinstance in time. For example, where a hardware component comprises ageneral-purpose processor configured by software to become aspecial-purpose processor, the general-purpose processor may beconfigured as respectively different special-purpose processors (e.g.,comprising different hardware components) at different times. Softwareaccordingly configures a particular processor or processors, forexample, to constitute a particular hardware component at one instanceof time and to constitute a different hardware component at a differentinstance of time. Hardware components can provide information to, andreceive information from, other hardware components. Accordingly, thedescribed hardware components may be regarded as being communicativelycoupled. Where multiple hardware components exist contemporaneously,communications may be achieved through signal transmission (e.g., overappropriate circuits and buses) between or among two or more of thehardware components. In embodiments in which multiple hardwarecomponents are configured or instantiated at different times,communications between such hardware components may be achieved, forexample, through the storage and retrieval of information in memorystructures to which the multiple hardware components have access. Forexample, one hardware component may perform an operation and store theoutput of that operation in a memory device to which it iscommunicatively coupled. A further hardware component may then, at alater time, access the memory device to retrieve and process the storedoutput. Hardware components may also initiate communications with inputor output devices, and can operate on a resource (e.g., a collection ofinformation). The various operations of example methods described hereinmay be performed, at least partially, by one or more processors that aretemporarily configured (e.g., by software) or permanently configured toperform the relevant operations. Whether temporarily or permanentlyconfigured, such processors may constitute processor-implementedcomponents that operate to perform one or more operations or functionsdescribed herein. As used herein, ‘processor-implemented component’refers to a hardware component implemented using one or more processors.Similarly, the methods described herein may be at least partiallyprocessor-implemented, with a particular processor or processors beingan example of hardware. For example, at least some of the operations ofa method may be performed by one or more processors orprocessor-implemented components. Moreover, the one or more processorsmay also operate to support performance of the relevant operations in a‘cloud computing’ environment or as a ‘software as a service’ (SaaS).For example, at least some of the operations may be performed by a groupof computers (as examples of machines including processors), with theseoperations being accessible via a network (e.g., the Internet) and viaone or more appropriate interfaces (e.g., an API). The performance ofcertain of the operations may be distributed among the processors, notonly residing within a single machine, but deployed across a number ofmachines. In some example embodiments, the processors orprocessor-implemented components may be located in a single geographiclocation (e.g., within a home environment, an office environment, or aserver farm). In other example embodiments, the processors orprocessor-implemented components may be distributed across a number ofgeographic locations.

‘Carrier Signal’ refers to any intangible medium that is capable ofstoring, encoding, or carrying instructions for execution by themachine, and includes digital or analog communications signals or otherintangible media to facilitate communication of such instructions.Instructions may be transmitted or received over a network using atransmission medium via a network interface device.

‘Computer-Readable Medium’ refers to both machine-storage media andtransmission media. Thus, the terms include both storage devices/mediaand carrier waves/modulated data signals. The terms ‘machine-readablemedium,’ ‘computer-readable medium’ and ‘device-readable medium’ meanthe same thing and may be used interchangeably in this disclosure.

‘Client Device’ refers to any machine that interfaces to acommunications network to obtain resources from one or more serversystems or other client devices. A client device may be, but is notlimited to, a mobile phone, desktop computer, laptop, portable digitalassistants (PDAs), smartphones, tablets, ultrabooks, netbooks, laptops,multi-processor systems, microprocessor-based or programmable consumerelectronics, game consoles, set-top boxes, or any other communicationdevice that a user may use to access a network.

‘Ephemeral Message’ refers to a message that is accessible for atime-limited duration. An ephemeral message may be a text, an image, avideo and the like. The access time for the ephemeral message may be setby the message sender. Alternatively, the access time may be a defaultsetting or a setting specified by the recipient. Regardless of thesetting technique, the message is transitory.

What is claimed is:
 1. A method, comprising: determining a gazedirection in a field of view of a user using an eyewear device;generating an anchor point in the field of view based at least in parton the determined gaze direction; identifying a surface corresponding toa ground plane in the field of view; determining a distance from theidentified surface to the anchor point; generating augmented realitycontent based at least in part on the determined distance; and renderingthe generated augmented reality content in the field of view for displayby the eyewear device.
 2. The method of claim 1, wherein generating theanchor point comprises: performing a ray casting operation, based atleast in part on the gaze direction, to select a point in the field ofview, the point corresponding to the anchor point.
 3. The method ofclaim 2, wherein the ray casting operation comprises: determining alocation of a pupil or iris of the user; projecting a ray, from thelocation of the pupil or iris, in a direction toward the field of view,the field of view comprising a set of pixels; determining at least onepixel from the field of view that intersects the ray; and selecting theat least one pixel as the anchor point.
 4. The method of claim 1,wherein determining the gaze direction is based on a head orientationand a relative position of a pupil or iris of the user using the eyeweardevice.
 5. The method of claim 1, wherein identifying the surfacecorresponding to the ground plane is based on a surface detectionprocess.
 6. The method of claim 5, wherein the surface detection processcomprises: generating a point cloud based on the field of view, thepoint cloud comprising a set of feature points, each feature pointinclude a set of respective x, y, and z coordinates in athree-dimensional space; and performing hit testing on the point cloudto determine a first surface plane in the field of view, the hit testingdetermining an intersection of at least one feature point correspondingto the first surface plane below a median feature point in the pointcloud.
 7. The method of claim 6, wherein performing hit testingcomprises: generating a three-dimensional line that includes a startingposition corresponding to a position of a pupil or iris of the user andextends from the gaze direction to the one feature point correspondingto the first surface plane in the field of view.
 8. The method of claim1, wherein determining the distance from the identified surface to theanchor point comprises: generating a second anchor point within theidentified surface; determining a first distance between the secondanchor point and the anchor point in the field of view, the secondanchor point being at a position below relative to the anchor point; andselecting a particular position along the first distance between thesecond anchor point and the anchor point.
 9. The method of claim 8,wherein rendering the generated augmented reality content in the fieldof view for display by the eyewear device comprises: generating a firstthree-dimensional object; rendering the first three-dimensional objectat the particular position; generating a second three-dimensionalobject; and rendering the second three-dimensional object at a secondposition above or below the first three-dimensional object.
 10. Themethod of claim 9, wherein the first three-dimensional object isdifferent type of object than the second three-dimensional object, orthe first three-dimensional object is a same type of object as thesecond three-dimensional object.
 11. A system comprising: a processor;and a memory including instructions that, hen executed by the processor,cause the processor to perform operations comprising: determining a gazedirection in a field of view of a user using an eyewear device;generating an anchor point in the field of view based at least in parton the determined gaze direction; identifying a surface corresponding toa ground plane in the field of view; determining a distance from theidentified surface to the anchor point; generating augmented realitycontent based at least in part on the determined distance; and renderingthe generated augmented reality content in the field of view for displayby the eyewear device.
 12. The system of claim 11, wherein generatingthe anchor point comprises: performing a ray casting operation, based atleast in part on the gaze direction, to select a point in the field ofview, the point corresponding to the anchor point.
 13. The system ofclaim 12, wherein the ray casting operation comprises: determining alocation of a pupil or iris of the user; projecting a ray, from thelocation of the pupil or iris, in a direction toward the field of view,the field of view comprising a set of pixels; determining at least onepixel from the field of view that intersects the ay; and selecting theat least one pixel as the anchor point.
 14. The system of claim 11,wherein determining the gaze direction is based on a head orientationand a relative position of a pupil or iris of the user using the eyeweardevice.
 15. The system of claim 11, wherein identifying the surfacecorresponding to the ground plane is based on a surface detectionprocess.
 16. The system of claim 15, wherein the surface detectionprocess comprises: generating a point cloud based on the field of view,the point cloud comprising a set of feature points, each feature pointinclude a set of respective x, y, and z coordinates in athree-dimensional space; and performing hit testing on the point cloudto determine a first surface plane in the field of view, the hit testingdetermining an intersection of at least one feature point correspondingto the first surface plane below a median feature point in the pointcloud.
 17. The system of claim 16, wherein performing hit testingcomprises: generating a three-dimensional line that includes a startingposition corresponding to a position of a pupil or iris of the user andextends from the gaze direction to the one feature point correspondingto the first surface plane in the field of view.
 18. The system of claim11, wherein determining the distance from the identified surface to theanchor point comprises: generating a second anchor point within theidentified surface; determining a first distance between the secondanchor point and the anchor point in the field of view, the secondanchor point being at a position below relative to the anchor point; andselecting a particular position along the first distance between thesecond anchor point and the anchor point.
 19. The system of claim 18,wherein rendering the generated augmented reality content in the fieldof view for display by the eyewear device comprises: generating a firstthree-dimensional object; rendering the first three-dimensional objectat the particular position; generating a second three-dimensionalobject; and rendering the second three-dimensional object at a secondposition above or below the first three-dimensional object.
 20. Anon-transitory computer-readable medium comprising instructions, whichwhen executed by a computing device, cause the computing device toperform operations comprising: determining a gaze direction in a fieldof view of a user using an eyewear device; generating an anchor point inthe field of view based at least in part on the determined gazedirection; identifying a surface corresponding to a ground plane in thefield of view; determining a distance from the identified surface to theanchor point; generating augmented reality content based at least inpart on the determined distance; and rendering the generated augmentedreality content in the field of view for display by the eyewear device.